Write a Java program that will prompt the user for their name and age, and translate their age from years to dog years. (1 year equals 7 dog years.)

Example session (user input in bold):

What is your name? Dave
How old are you, Dave? 41
Dave, in dog years you are 287 years old

Getting Started

Download CS201_Lab01.zip. Import it into Eclipse:

File→Import...→General→Existing Projects into Workspace→Select Archive File

You should see a project called CS201_Lab01 in the Package Explorer window.

Run the program by right-clicking on the file DogYears.java in the edu.ycp.cs201.dogyears package, and then choosing

Run As→Java Application

Hints

Use a java.util.Scanner object to read from the keyboard.

Submitting

When you are done, submit the lab to the Marmoset server using either of the methods below.

From Eclipse

If you have the Simple Marmoset Uploader Plugin installed, then right click on the project (CS201_Lab01) and choose Submit project.... Enter your Marmoset username and password when prompted.

From a web browser

Save the project (CS201_Lab01) to a zip file by right-clicking it and choosing

Export...→Archive File

Upload the saved zip file to the Marmoset server as lab01. The server URL is

https://cs.ycp.edu/marmoset/