Does any1 knwo hwo to do comp115 assignemtn i got no freaken clue.......
Introduction
Basketball is a game played by two teams over 4 quarters of 12 minutes each.
Given the score of the two teams at some point in the match, it is possible to give an estimate of the score at the end, assuming that the points are scored at the same rate on average.
Your Task
The goal of this assignment is to complete a C++ program that reads from the user
- - The current quarter (1,2,3 or 4)
- - The remaining time to play in this quarter (in min and sec)
- - The score of the home team
- - The score of the away team
The program should then be able to determine what should be the scoreboard at the end.
Since we do not expect this method to be very precise, the program should output the scores rounded to the nearest multiple of 5.
Note that 2.5 should be rounded to 5.
Note that the format of your output should be exactly similar to the one of examples given below (in particular the presentation and indentation should be the same).
Examples
Here are some sample inputs and outputs to the program basket.exe:
Sample 1:
Enter the initial quarter: 1
Enter the remaining time (min sec): 5 58
Enter the score of the away team: 12
Enter the score of the home team: 14
|-----------|
| Q 4 |
| 00:00 |
|-----------|
|95 | 110|
|-----------|
Press CTR-C to Leave...
Sample 2:
Enter the initial quarter: 3
Enter the remaining time (min sec): 10 12
Enter the score of the away team: 55
Enter the score of the home team: 52
|-----------|
| Q 4 |
| 00:00 |
|-----------|
|100 | 95|
|-----------|
Press CTR-C to Leave...
http://online.mq.edu.au/pub/COMP115/assignments/ass1/ass1.html
Introduction
Basketball is a game played by two teams over 4 quarters of 12 minutes each.
Given the score of the two teams at some point in the match, it is possible to give an estimate of the score at the end, assuming that the points are scored at the same rate on average.
Your Task
The goal of this assignment is to complete a C++ program that reads from the user
- - The current quarter (1,2,3 or 4)
- - The remaining time to play in this quarter (in min and sec)
- - The score of the home team
- - The score of the away team
The program should then be able to determine what should be the scoreboard at the end.
Since we do not expect this method to be very precise, the program should output the scores rounded to the nearest multiple of 5.
Note that 2.5 should be rounded to 5.
Note that the format of your output should be exactly similar to the one of examples given below (in particular the presentation and indentation should be the same).
Examples
Here are some sample inputs and outputs to the program basket.exe:
Sample 1:
Enter the initial quarter: 1
Enter the remaining time (min sec): 5 58
Enter the score of the away team: 12
Enter the score of the home team: 14
|-----------|
| Q 4 |
| 00:00 |
|-----------|
|95 | 110|
|-----------|
Press CTR-C to Leave...
Sample 2:
Enter the initial quarter: 3
Enter the remaining time (min sec): 10 12
Enter the score of the away team: 55
Enter the score of the home team: 52
|-----------|
| Q 4 |
| 00:00 |
|-----------|
|100 | 95|
|-----------|
Press CTR-C to Leave...
http://online.mq.edu.au/pub/COMP115/assignments/ass1/ass1.html