Answered step by step
Verified Expert Solution
Link Copied!

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

image

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Statistics

Authors: Michael Sullivan III

4th Edition

978-032184460, 032183870X, 321844602, 9780321838704, 978-0321844606

More Books

Students also viewed these Programming questions