Paracells / stage0-module4-conditions-task3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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) {
    }
}

About


Languages

Language:Java 100.0%