Giter Club home page Giter Club logo

stage0-module4-conditions-task3's Introduction

Tasks:

1. Seasons.

Print the name of a season by number of a month(e.g. if number is 6 => "Summer"). Number of the month will be coming from parameter of the method(if number is not a month number e.g. 13 => print: "wrong number!" ):

public class Seasons {
    public void tellTheSeasonByMonthNumber(int month) {
    }
}

2. Aliquot numbers.

Implement the program that will consume 2 numbers as method arguments and will print if the first number is Aliquot(prints:"Aliquot" is yes otherwise "Not aliquot") to the other:

public class AliquotNumbers {
    public void isFirstAliquot(int first, int second) {
    }
}

3. Is symbol english determiner.

Implement the program that prints to console if char is from ENG layout (prints "English") or no(prints "Non English"):

    public class IsEnglishSymbolDeterminer {
        public void isEnglishSymbol(char symbol) {
        }
    }

4. Salary calculator.

Implement the program that will consume salary from method argument as input of an employee and calculate its salary after taxes according to the following: Basic Salary <= 10000: taxes - 15%. 10000 < Basic Salary <= 20000: taxes - 18% Basic Salary > 20000 : taxes - 20% Basic salary < 0 -> "wrong input!"

public class SalaryCalculator {
    public void calculateSalary(int salary) {
    }
}

5. Divider.

Implement the program to check and print whether a number from method argument is divisible by 5 and 11 or not by using if-else(print "Dividable" if so otherwise "Non-dividable" and if 0 -> "cannot divide by zero"):

public class Divider {
    public void isDividableBy5And11(int number) {
    }
}

6. Alphabetic characters.

Implement the program that will consume a character from method argument which will be from english alphabet and print vowel if it is "Vowel" or consonant if it's "Consonant". And If it is not from eng alphabet than print "wrong alphabet!"

public class AlphabeticCharacters {
    public void vowelDeterminer(char character) {
    }
}

7. Days in month printer.

Implement the program that will consume a number month from method argument and print amount of days in that month, if number is not a month number -> print: "wrong number!":

public class DaysInMonthPrinter {
    public void amountOfDays(int month) {
    }
}

stage0-module4-conditions-task3's People

Contributors

mmode15 avatar sukora-stas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.