Assignment title: Java
Question
Advanced programming concepts
Q
Write a 10 Kilometer Run Race program in Java. There are only 4 runners. The program takes input as 1) Name of runner 2) the age of runner 3) Time taken in minute to finish the race. The age limit for the race is 20 years to 60 years. The age group of runners are 20-29, 30-39, 40-49, 50-60. The race is from 8 am to 12 pm at the race day. The program outputs as 1) Group the runner by their age group which is ordered as younger to older 2) in each age group, the runner is ordered as fastest to lowest. 3) Calculate place according to finished time.
For input and output you can use standard system input output in Java. If you want you can also use Java GUI tool such as Swing or JavaFx in your program. Sufficient comments should be placed in the source code. The program also properly checks for wrong input.
Please submit only 1) the source code (.java file) for this project 2) Two sample runs of your program showing the inputs and outputs.
A sample output of the program will look like
Name Age Group Time (min) place
AB 20 – 29 60 1
PD 30 – 39 50 1
HN 30 – 39 61 2
OJ 30 – 39 75 3
.....................................................................
Total of 10 points is possible for this project. This is divided as:
a) 2 points for the proper coding style of the source code
Please follow the Oracle guideline http://www.oracle.com/technetwork/java/codeconventions-150003.pdf
Or, Google code guideline: https://google.github.io/styleguide/javaguide.html
b) 2 points for proper comments in your code (correct and relevant comments)
c) 1 point for the proper output format
d) 5 points for the correct logic and correctness of the program
Due date of this project is : Friday October 2, 2015 at 11.59 pm.
For this project you may need refresh your Java knowledge from any Java text book. You can also look at online for basice Java technology knowledge. One of the authentic place to look for Java knowledge is: http://docs.oracle.com/javase/tutorial/
Two essential online source will be:
1) Learning the Java Language : http://docs.oracle.com/javase/tutorial/java/index.html
2) Creating Graphical User Interfaces : http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
For the style of coding, please use one of the below:
1) Oracle guideline http://www.oracle.com/technetwork/java/codeconventions-150003.pd