Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Below is the implementation of the CheckNumber class with the described methods and the main method ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started