PROGRAM SPECIFICATION
RTÉ Celebrity Dancing with the Stars
RTÉ are planning to produce a Celebrity Dancing with the Stars show. Celebrities dance and are scored on their dancing by a number of judges. After they have danced, each judge scores the dancer, with scores ranging from 0.0 to 6.0 in increments of 0.1. The highest and lowest of the marks are ignored and an average is taken of the remainder to give the final result. When all celebrities have danced, the celebrity with the highest score is deemed to be the winner .
The number of judges and celebrities taking part varies from year to year. However, the number of judges will always be between 3 and 6 (inclusive) and the number of celebrities will always be between 10 and 14 (inclusive).
The program should begin by requesting the number of judges and the number of celebrities taking part. You must ensure that:
• The number of judges is between 3 and 6 inclusive and • The number of celebrities is between 10 and 14 inclusive.
Before each celebrity dances, ask for their name. You must ensure that:
• Only letters and numbers can be entered for a celebrity’s name.
After the celebrity has danced, ask for a score from each judge. You must ensure that:
• The score entered is between 0 and 6 inclusive.
• Each score is entered correct to 0 or 1 place of decimal.
After all marks have been entered, calculate and output the final mark for each celebrity. The final mark awarded to each celebrity should be output to two decimal places.
When all celebrities have danced, output the name and the score of the winner in the following format (centred within a border).
And the winner is…
Winning Name
Winning Score
You are required to design, code and test a solution to the above narrative.
SUBMIT
1.
Documentation
• An algorithm for your program.
• Comments within your program.
• A data dictionary
2. The testing of your program
• Include one successful test for at least 10 celebrities, which also identifies the winner of the competition.
• Include tests for at least 5 input errors that might occur e.g. if the user enters 6.7 as a score.
• Include the expected results of your test data.
• Include screenshots of your test data and results.
3. Your work uploaded to Moodle
You will upload two files to Moodle.
• A single PDF document containing:
a. Algorithm
b. Data dictionary
c. Source code (keep the formatting that is in Eclipse when you paste the code).
d. Test data with your expected results.
e. Test data with the actual results.
• Skills Demo 2 – Java source code
Upload your .java code located in the src folder.
MARKING SCHEME