Question: Problem Description: class that determines if a number is odd or even and positive or negative. The class, CheckNumber has two methods in addition

Problem Description: class that determines if a number is odd or even

Problem Description: class that determines if a number is odd or even and positive or negative. The class, CheckNumber has two methods in addition to a main method. The first method is called isNegative and has a return type of Boolean. It takes one argument of type int. The processing for this class is: If the input argument is negative return true, otherwise return false. The second method is called is Even. It also has a return type of Boolean. It takes one argument of type integer. If the argument is an even integer return true, otherwise return false. The main method asks the user to input an integer. Then the main method calls the isNegative and isEven methods. Using the returned values, tell the user if their number is negative or not and tell them if it is an even number or not.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Below is the implementation of the CheckNumber class with the described methods and the main method ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!