Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA please help quick! i need done in 40 min Write a method that Inputs 5 one-digit numbers from the user. Make sure to use

JAVA please help quick! i need done in 40 min

Write a method that

  1. Inputs 5 one-digit numbers from the user.
    1. Make sure to use clear prompts. Use word ENTER in prompts to pass CodeGrade tests.
  2. Uses validation loops (or methods) so that the user cannot input anything other than one-digit number
    1. User must get error messages explaining why the value was rejected. All error messages must contain word ERROR in order to pass CodeGrade tests.
  3. The method calculates and prints out the largest of 5 integers provided by the user.
  4. See sample method calls below.

Method header: public static void problem02()

Add Java Doc comments before the method header.

This method is being tested automatically on CodeGrade with the help of regular expressions. Make sure to use the key words ENTER and ERROR in all caps as described above.

See sample method run below:

ENTER a one-digit number oops ERROR: Your input is not an integer. ENTER a one-digit number 876 ERROR: The number has more than one digit! ENTER a one-digit number 1 ENTER a one-digit number blah ERROR: Your input is not an integer. ENTER a one-digit number hehe ERROR: Your input is not an integer. ENTER a one-digit number 765 ERROR: The number has more than one digit! ENTER a one-digit number -9 ENTER a one-digit number 5 ENTER a one-digit number 2 ENTER a one-digit number 3 LARGEST = 5

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

Step: 3

blur-text-image

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago