SpellBee is a competition for local school children to compete against each other to find out who is the ultimate Spelling Bee Champion for the region. Two students from each school are selected to compete in the Championship Round.
Your task is to design, develop and test a small application for managing the Championship results.
Stage 1: Design
This stage requires you to prepare documentation that describes the function of the program and how it is to be tested. There is no coding or code testing involved in this stage. A document template has been provided for your use.
Requirements:
Test Case, Expected Result, Actual Result
Display Results selected, Each competitor is listed in order of highest score to lowest scores, with their position, name, school and final score identified.
Stage 2: Program Development
Using the Design Documentation to assist you, develop a Java program that uses object-oriented coding approaches to record and report upon the SpellBee Championship round, implementing the requirements outlined in this section.
You must follow coding conventions, such as proper layout of code, using naming conventions and writing meaningful comments throughout your program.
Overview of the Program:
This section provides an overview of how the program works from the users perspective. You may change the appearance of the program provided you implement the same functionality.
1. When the program starts, it provides a short message for initializing the contest administration system and prompts the user to enter the number of questions in the competition. The user must enter a whole number greater than or equal to 1, otherwise the system keeps prompting for the required number of questions until a valid entry is made.
Initialising Contest Administration System...
How many questions are required? (minimum of 1):
2. Once the number of questions required is obtained, the program automatically initialises. This initialisation includes creating the contest, creating the schools, creating the students and registering the students in the contest.
How many questions are required? (minimum of 1):
5
>>> Initialising Championship <<<
... Successfully created contest SpellBee Championship
>>> Registering Participating Schools <<<
... Successfully registered Lilla School
... Successfully registered Walungurru School
... Successfully registered Areyonga School
... Successfully registered Amoonguna School
... Successfully registered Mutitjulu School
>>> Creating Student Records <<<
... student Harry Potter created.
... student Ronald Weasley created.
... student Hermione Granger created. student Draco Malfoy created.
... student Neville Longbottom created.
... student Vincent Crabbe created.
... student Gregory Goyle created.
... student Luna Lovegood created.
... student Pansy Parkinson created.
... student Anthony Goldstein created.
>>> Registering students in contest <<<
... Successfully registered Harry Potter representing Lilla School 1
... Unable to register Harry Potter. Duplicate registration.
... Successfully registered Ronald Weasley representing Lilla School
... Unable to register Pansy Parkinson. School registration limit met.
... Successfully registered Hermione Granger representing Walungurru School
... Successfully registered Draco Malfoy representing Walungurru School
... Successfully registered Neville Longbottom representing Areyonga School
... Successfully registered Vincent Crabbe representing Areyonga School
... Successfully registered Gregory Goyle representing Amoonguna School
... Successfully registered Luna Lovegood representing Amoonguna School
... Unable to register Anthony Goldstein. Contest registration limit met.
<<< Initialisation complete >>>
3. When initialisation is complete, a menu appears providing the user with options to Enter Results, Display Results, View Program Credits or Exit Program.
SpellBee Championship Administration
Please select an option below:
1. Enter Scores
2. Display Results
3. View Program Credits
4. Exit program
4. When the user selects the Enter Scores option, the user is prompted to enter the scores each student obtains on each question in the contest. These scores must be whole numbers between 0 and 10.
Enter Scores
Scores for Question 1
Enter score for Harry Potter:
10
Enter score for Ronald Weasley:
8
Enter score for Hermione Granger:
15
Invalid score: must be between and 10.
Enter score for Hermione Granger:
10
Enter score for Draco Malfoy:
6
Enter score for Neville Longbottom:
7
Enter score for Vincent Crabbe:
-1
Invalid score: must be between 0 and 10.
Enter score for Vincent Crabbe:
0
Enter score for Gregory Goyle:
1
Enter score for Luna Lovegood:
10
Scores for Question 2
Enter score for Harry Potter:
8
Enter score for Ronald Weasley:
7
Enter score for Hermione Granger:
10
Enter score for Draco Malfoy:
a. When all results have been entered for the contest, a message Score entry complete appears and the menu is shown again.
Scores for Question 5
Enter score for Harry Potter:
8
Enter score for Ronald Weasley:
10
Enter score for Hermione Granger:
9
Enter score for Draco Malfoy:
6
Enter score for Neville Longbottom:
10
Enter score for Vincent Crabbe:
8
Enter score for Gregory Goyle:
1
Enter score for Luna Lovegood:
9
Score entry complete
SpellBee Championship Administration
Please select an option below:
1. Enter Scores
2. Display Results
3. View Program Credits
4. Exit program
5. When the user chooses the Display Results option, the results of the championship are displayed by student. Students are listed in order of their total scores across all questions, from highest to lowest, and their name, school and total score earned are shown. The menu is then redisplayed.
SpellBee Championship Results
1. Hermione Granger Walungurru School 49 points
2. Luna Lovegood Amoonguna School 47 points
3. Ronald Weasley Lilla School 41 points
4. Harry Potter Lilla School 38 points
5. Neville Longbottom Areyonga School 32 points
6. Draco Malfoy Walungurru School 27 points
7. Vincent Crabbe Areyonga School 5 points
8. Gregory Goyle Amoonguna School 4 points
6. When the user selects the option to View Program Credits, a message is displayed providing authorship information for this program. The main menu is then redisplayed.
Program Credits
This program was developed by:
Amy Meade, student ID 30000000
for ITECH1000 Programming 1 Semester 2 2017
7. When the user selects the option to Exit program, a message thanks the user for using the system, and the program terminates.
SpellBee Championship Administration
Please select an option below:
1. Enter Scores
2. Display Results
3. View Program Credits
4. Exit program
Thanks for using the SpellBee Championship Administration System
This section provides technical implementation details required by the programmer to create the program. You must address these requirements as specified.
Development of this program requires four classes: Contest, Student, School and Competitor as well as a Driver class to control the flow of the program.
Driver Class: Name this file ID3XXXXXXX, where the Xs are replaced by your student ID. This class will contain a main() method to manage the flow of the program, and other methods as necessary to ensure the code is modularized and functions correctly.
Contest Class: This represents a Contest, in this case the SpellBee Championship round. Use the class diagram below as the basis for designing your class.
Contest
----------------------------------------
- name: String
- MAX_COMPETITORS: int {readOnly}
- NUMBER_OF_QUESTIONS: int {readOnly}
- MAX_SCHOOL_ENTRANTS: int {readOnly}
- competitors: Competitor[]
~ Contest(String, int, int, int)
----------------------------------------
+ getContestName(): String
+ getCompetitorLimit(): int
+ getNumberOfQuestions(): int
+ registerCompetitor(Student)
- capacityReached(): boolean
- schoolLimitReached(School): boolean
+ enterScores()
+ viewContestScores()
- sortResults()
Student Class: This represents a Student from one of the participating schools. Use the class diagram below as the basis for designing your class.
Student
----------------------------------------
- name: String
- enrolledSchool: School
----------------------------------------
~ Student(String, School)
+ getName(): String
+ getSchool(): School
School Class: This represents a local School participating in the SpellBee Challenge. Use the class diagram below as the basis for designing your class.
School
----------------------------------------
- name: String
- registrationID: String
----------------------------------------
~ School(String, String)
+ getName(): String
+ getID(): String
Competitor Class: This represents a single Student registered to compete in the contest, and the scores they obtain for each question in the contest. Use the class diagram below as the basis for designing your class.
Competitor
----------------------------------------
- competitor: Student
- quizScores: int[]
----------------------------------------
~ Competitor(Student, int)
+ setScore(int, int)
+ getScore(int)
+ getCompetitor(): Student
+ totalScore(): int
Initialising the Program:
Initialising the program requires the following steps:
Running the Program:
1. Entering Scores
2. Displaying Results
3. Viewing Program Credits
4. Exit Program
Stage 3: Testing
Using a copy of the test cases developed in Stage 1: Design, test the program you have developed in Stage 2: Program Development. Document your results, including both failed and successful tests.
Note: Please do not leave out any failed tests. If your testing highlights that your program has not worked correctly, then the failed tests help to demonstrate that you have been testing your program properly.
To show that you have tested your program, include small (but readable) screen captures in your Actual Results as well as any explanatory comments. Microsoft Windows includes a Snipping Tool that is useful for taking captures of the relevant parts of the screen.