Assigned: 2020-09-09
Due Date: 2020-09-11 by 11:59PM U.S. Central Time
You have been hired by Wii Sports, and they have tasked you with creating a scoresheet for their bowling game!
The rules of bowling scoring are described on Wikipedia:
In traditional scoring, one point is scored for each pin that is knocked over, and when less than all ten pins are knocked down in two rolls in a frame (an open frame), the frame is scored with the total number of pins knocked down. However, when all ten pins are knocked down with either the first or second rolls of a frame (a mark), bonus pins are awarded as follows.
- Strike: When all ten pins are knocked down on the first roll (marked "X" on the scoresheet), the frame receives ten pins plus a bonus of pinfall on the next two rolls (not necessarily the next two frames). A strike in the tenth (final) frame receives two extra rolls for bonus pins.
- Spare: When a second roll of a frame is needed to knock down all ten pins (marked "/" on the scoresheet), the frame receives ten pins plus a bonus of pinfall in the next roll (not necessarily the next frame). A spare in the first two rolls in the tenth (final) frame receives a third roll for bonus pins.
The goal of this activity is to plan out the design/object decomposition of a bowling scoresheet that a user can interact with via the command line, as shown below.
Note: In these examples, the user is prompted to choose the player names and how many pins are knocked down on the next roll. So, Jason, Colleen, Patrick
and 7
are both user inputs, and everything else is printed by the program.
Player names: Jason, Colleen, Patrick
Number of pins knocked down on next roll: 7
Frame 1 2 3 4 5
Jason 7,- -,- -,- -,- -,-
- - - - -
Colleen -,- -,- -,- -,- -,-
- - - - -
Patrick -,- -,- -,- -,- -,-
- - - - -
Number of pins knocked down on next roll: 3
Frame 1 2 3 4 5
Jason 7,/ -,- -,- -,- -,-
- - - - -
Colleen -,- -,- -,- -,- -,-
- - - - -
Patrick -,- -,- -,- -,- -,-
- - - - -
Number of pins knocked down on next roll: 10
Frame 1 2 3 4 5
Jason 7,/ -,- -,- -,- -,-
- - - - -
Colleen X,- -,- -,- -,- -,-
- - - - -
Patrick -,- -,- -,- -,- -,-
- - - - -
Number of pins knocked down on next roll: 9
Frame 1 2 3 4 5
Jason 7,/ -,- -,- -,- -,-
- - - - -
Colleen X,- -,- -,- -,- -,-
- - - - -
Patrick 9,- -,- -,- -,- -,-
- - - - -
Number of pins knocked down on next roll: 0
Frame 1 2 3 4 5
Jason 7,/ -,- -,- -,- -,-
- - - - -
Colleen X,- -,- -,- -,- -,-
- - - - -
Patrick 9,0 -,- -,- -,- -,-
9 - - - -
Number of pins knocked down on next roll: 4
Frame 1 2 3 4 5
Jason 7,/ 4,- -,- -,- -,-
14 - - - -
Colleen X,- -,- -,- -,- -,-
- - - - -
Patrick 9,0 -,- -,- -,- -,-
9 - - - -
and so on...
Your group is responsible for creating the classes and deciding what member variables/functions each class should contain. For each member function, your group should:
However, since the focus of the activity is on design/object decomposition, you shouldn’t actually implement the body of any functions. This is reflective of how we expect you to approach coding assignment in this class: design first, then test, then implement.
Don't get too caught up polishing your Javadoc to the point of being impeccable. It's more important to actually finish designing all of the classes and write out all of the method signatures.
One member of your team should go to https://codecollab.io/ and click on “Get Started” (select Java as the language). Then, click on “Share” and share the link with other members of the group. At the end of class, one member of the team should click “Download”, which should result in a zip file being downloaded. Then, only one member of the team should upload that zip file to Gradescope and use the add group members feature to add the other teammates.