Question
This Semesters Project will be on Creating A Running Log. The running log can consist of recording/calculating running pace for certain distances over time. It
This Semesters Project will be on Creating A Running Log. The running log can consist of recording/calculating running pace for certain distances over time. It is also possible the project will grow and incorporate other aspects of running- For example, recording the outdoor temperature during a run, calculating how many calories were burned during a run, cumulative running distance, etc.
This weeks project work takes a similar track (pardon the pun) to the previous assignments. However, you are to use File I/O to complete this weeks work. There needs to be two classes, each with a main method, and runnable separately, called ReadRunnersMain.java and WriteRunnersMain.java.
The ReadRunnersMain class should:
- Read from a file called Runners.txt (example attached).
- The Runners.txt file should have 3 space-separated column, each row storing
- Name of the runner
- Distance of the run (in miles, decimal)
- Time of the run (in minutes, decimal)
- The Runners.txt file should have 3 space-separated column, each row storing
- Output to System.out:
- The total number of runs from step 1
- The total distance of all runs from step 1
- The total time of all runs from step 1
- The names of each runner from step 1
The WriteRunnersMain class should:
- Create a writeable file called NewRunners.txt
- Ask the user for number of runs
- For each run:
- Ask the user the name of the runner for a run
- What the distance was in miles (in decimal format)
- What the time was in minutes (in decimal format, e.g. 23.9 minutes is acceptable)
- Write a row in NewRunners.txt file with the name, distance, and time of the run
Note: The format of Runners.txt should match the format of NewRunners.txt. So if a file is created from WriteRunnerMain, simply renaming that file to Runners.txt, should allow it to properly run in ReadRunnerMain.
Also Note: In general, Project work will be more free-form than other assignments. Please make it as usable and readable to the user as possible. But, in this case input/output file format for both classes should match the example. Also, since you have learned Exception Handling, and to receive full credit, incorporate some appropriate try/catch exception handling to demonstrate understanding of the concept.
The inputs and outputs are whatever you would like! This is for my Java Programming ll class!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started