Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4-Write a program Submit a program called: EvenOdd java Lrs wants to create a program that asks a user to first enter an even

image text in transcribed
Problem 4-Write a program Submit a program called: EvenOdd java Lrs wants to create a program that asks a user to first enter an even number (continuing to prompt the user for an even number if they do not actually enter an even number). Afterwards, he wants the user to enter an odd number (once again, continuously prompting the user if they do not at first enter an odd number). Once the user has done this, he wants the program to exit saying: ***Thanks! Bye!** He wants to use the following methods (no credit if methods are not used): public static int getUserinput(String message) public static boolean checklfEven(int n) (Feel free to create any additional helper methods). Sample Run: --Enter an even number: That is not even. Enter an even number. 9 That is not even. Enter an even number. 4 --Ok thanks! Now enter an odd number: 4 That is not odd. Enter an odd number. 8 That is not odd. Enter an odd number. 9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions