Assignment 4: Let's Run


The goal of this assignment is to implement while loops in a slightly bigger program than those in the lab exercises or than those you will consider on the OWL exercises this week. 

This assignment has two parts.  All parts must be completed for full credit.  This is an individual assignment.

Part 1: Let's Run!

Spring is another favorite time for starting new exercise programs.  You will write a program to help someone prepare for a race.  The program will allow a runner keep track of information about training runs of different lengths at different paces.  The goal of your program is to offer a runner the possibility of entering data (distance of a run in miles and a time for the run) for as many training runs as the runner wishes, and to offer statistics on the average pace (minutes per mile) for each training run, and for the total of all runs entered.  In particular, you program should:

  1. (5 points) Greet the user with a welcome message
  2. (5 points) Ask the user if he/she wants to enter data for training run(s); if the answer is no, display a farewell message and quit the program
  3. (10 points) As long as the user says he/she has a run to enter, keep asking for:
    1. (5 points) The mileage of the run
    2. (5 points) The goal time of the run in minutes
  4. (10 points) After each set of data, tell the user what the pace for that run was in minutes per mile.
  5. When the user says he/she is done entering runs, offer to the user a menu with the following options:
    1. (5 points) See the total number of training runs entered
    2. (5 points) See the total mileage of the runs
    3. (5 points) See the length of the longest run entered in miles
    4. (15 points) See the average pace in minutes per mile for all training runs
    5. (5 points) Quit the program
  6. (10 points) As long as the user does not choose to quit, the program will show the data corresponding to the menu choice and then re-offer the menu

(10 points) Given the amount of data you need to track and the number of calculations you will have to perform while entering the data from the user, it is essential that you write your JEnglish carefully before starting to write Java code.  Make sure you include all the small steps you plan to implement.  Also include your name, homework number, and class information.

Part 2: How was it?

(5 points) Create a short ReadMe Word or text file (ReadMe.doc or ReadMe.txt) containing the following information:

  1. Your full name
  2. Class, section, and homework number
  3. A couple of paragraphs describing the main difficulties encountered when completing this assignment as well as the aspect that was the most fun.

Submitting the assignment

Create a .zip file with the necessary documents from each part of the assignment and upload this file to the COL site.  The .zip file should be called where yourLastName is your last name and should contain the following items:

  1. The Word or text file JEnglish/pseudocode version of your solution
  2. The .java file that contains your source code
  3. The ReadMe file with your reflection on the assignment


The assignment is worth 100 points.  The points for each required item are indicated above.