Question: Create a Java program that has the following features: Prompt the user with the message Enter your age Read a value from the user (error

Create a Java program that has the following features:

  • Prompt the user with the message "Enter your age"
  • Read a value from the user (error checking is not required)
  • Calculate a new value which is the user entered data times 7
  • Print the output message "You would be XX in Dog Years" where XX is your new value.

Upload just the Java code. Do not upload the entire Project. You can cut and paste the code into the Assignment Text box.

The example programs in the lectures use a special set of command to easily read data from the keyboard. This consist of

  1. At the top of the program add import.java.util.*;
  2. Right below the Public Class line enter static Scanner kbd;
  3. The first line in main() should be kbd = new Scanner(System.in);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!