YCP Logo Lab 1: Dog Years

Due: Friday, August 29th by 11:59 PM

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? 36
Dave, in dog years you are 252 years old

Getting Started

Download CS201_Lab1.zip. Import it into Eclipse:

File->Import...->General->Existing Projects into Workspace->Select Archive File

You should see a project called CS201_Lab1 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


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


When you are done, save the project (CS201_Lab1) to a zip file by right-clicking it and choosing

Export...->Archive File

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