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
- At the top of the program add import.java.util.*;
- Right below the Public Class line enter static Scanner kbd;
- The first line in main() should be kbd = new Scanner(System.in);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
