Assignment Part 1 Design
Assignment Part 1 Design
Object-Oriented Programming
Assignment 1
All-That-Dice UML Design
WARNING
This material has been reproduced and communicated to you by or on behalf of the University of
South Australia in accordance with section 113P of the Copyright Act 1968 (Act). The material in
this communication may be subject to copyright under the Act. Any further reproduction or
communication of this material by you may be the subject of copyright protection under the Act.
Introduction
The assignment is intended to provide you with the opportunity to put into practice what you have
learnt in the course by applying your object-oriented design knowledge and skills. It will require you
to apply object-oriented methods to design a text-based application software where users can play
dice games.
The Assignment 1 is worth 10% of the Course Total. This document specifies the tasks for a UML design
of the software.
This assignment is an individual task that will require an individual submission. You are required to
submit your work via the course website as prescribed in the Submission Details section. You are
not allowed to discuss or work with anybody on this assignment, and you are not allowed to use
any AI tools that generate a solution for you (see also Academic Misconduct below and on the UniSA
website). In your workshop class in Week 11 you will be asked questions about your design. You
only receive a mark if you are present and answer questions about your work.
This document is a specification of a required end product for which an object-oriented design should
be created. The design should be detailed enough so it could be implemented in an object-oriented
way. Like many specifications, it is written in English and hence will contain some imperfectly specified
parts. Please make sure you seek clarification if you are not clear on any aspect of this assignment.
Course Objectives
By completing this assignment, you are expected to partially fulfill the following course objects:
As a text-based application software, All-That-Dice will use a command line interface where users type
in a command or input and the relevant output is printed onto the screen in text. When the software
is executed, it will show a greeting message and a list of commands, followed by a command prompt
‘>’ indicating the system is ready to take user’s input. At the prompt, users can give one of the
following commands:
For registering a new player, the system will ask for the name of the new player. The name is not
allowed to be changed after being registered, and also the name must be unique (i.e. not allowed to
have the same name as an existing player). A new player is given 100 chips for playing games.
Below is an example of the output on the screen (user’s input in bold italic).
Welcome to All-That-Dice!
Developed by Alan Turing
COMP 1048 Object-Oriented Programming
The game of Maxi is played with a pair of dice. Each player in the game takes turn to throw a pair of
dice and the player who gets the highest sum of the face up values wins the game. If more than one
player throws the same highest sum, then those players keep playing with others being left out. For
example, below is an example of three players playing:
Let the game begin!
It’s Steve’s turn.
How strong will you throw (0-5)?
> 3
⚄⚀
It’s Alan’s turn.
How strong will you throw (0-5)?
> 0
⚀⚂
It’s Bill’s turn.
How strong will you throw (0-5)?
> 5
⚃⚁
Players remaining: Steve, Bill
It’s Steve’s turn.
How strong will you throw (0-5)?
> 1
⚂⚃
It’s Bill’s turn.
How strong will you throw (0-5)?
> 5
⚅⚄
Congratulations, Bill! You win!
The game of Bunco is played with a set of three dice. There are six rounds in each game, and in each
round the players take turns to roll dice in round robin (in the order of the players added to the game).
The first round starts from the first player added to the game, then the rest of the rounds starts from
the next player after the last player played in the previous round. Once a player in turn rolls dice, one
point is awarded for each die that matches the current round number. For example, if two dice has a
face up value of 3 after rolled in round 3 that player is awarded 2 points. If all three dice match the
current round number (named a "Bunco"), 21 points are awarded. If all three dice match each other
but do not match the current round number, 5 points are awarded. If any points are scored in his/her
turn, the player gets to roll again, continuing to add to their score in round. If no points are awarded
after rolling dice, that player's turn ends and the next player plays. Each round ends when a player has
scored 21 points, which makes rolling a bunco an instant win. At the end of each round, the winner of
that round is announced. The game ends when all six rounds are complete. At the end of the game a
summary of the scores of each player in each round and the number of buncos played is reported,
along with the winner of the game. The player with the most rounds won is the overall game winner,
with ties broken by comparing total points scored. If the total points scored are the same, the player
who had more Buncos win. Below is an example of three players playing the game of Bunco.
<Round 1>
It’s Steve’s turn.
How strong will you throw (0-5)?
> 5
⚄⚀⚃
You earned 1 point, 1 point in total.
Keep playing Steve.
How strong will you throw (0-5)?
> 3
⚀⚀⚂
You earned 2 points, 3 points in total.
Keep playing Steve.
How strong will you throw (0-5)?
> 1
⚅⚄⚁
You earned no points, 3 points in total.
It’s Bill’s turn.
How strong will you throw (0-5)?
> 2
⚀⚀⚀
Bunco!
You earned 21 points, 21 points in total.
Bill is the winner in round 1!
<Round 2>
It’s Alan’s turn.
How strong will you throw (0-5)?
> 5
⚁⚃⚁
You earned 2 points, 2 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 3
⚃⚃⚃
You earned 5 points, 7 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 3
⚃⚃⚀
You earned no points, 7 points in total.
It’s Steve’s turn.
How strong will you throw (0-5)?
> 0
⚁⚁⚁
Bunco!
You earned 21 points, 21 points in total.
Steve is the winner in round 2!
<Round 3>
It’s Bill’s turn.
How strong will you throw (0-5)?
> 2
⚂⚂⚂
Bunco!
You earned 21 points, 21 points in total.
Bill is the winner in round 3!
<Round 4>
It’s Alan’s turn.
How strong will you throw (0-5)?
> 1
⚂⚂⚂
You earned 5 points, 5 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 2
⚁⚁⚁
You earned 5 points, 10 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 0
⚃⚀⚃
You earned 2 points, 12 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 3
⚀⚀⚀
You earned 5 points, 17 points in total.
Keep playing Alan.
How strong will you throw (0-5)?
> 2
⚅⚅⚅
You earned 5 points, 22 points in total.
Alan is the winner in round 4!
<Round 5>
It’s Steve’s turn.
How strong will you throw (0-5)?
> 4
⚂⚁⚂
You earned 0 points, 0 points in total.
It’s Bill’s turn.
How strong will you throw (0-5)?
> 2
⚁⚄⚄
You earned 2 points, 2 points in total.
Keep playing Bill.
How strong will you throw (0-5)?
> 5
⚀⚁⚂
You earned 0 points, 2 points in total.
It’s Alan’s turn.
How strong will you throw (0-5)?
> 5
⚄⚄⚄
Bunco!
You earned 21 points, 21 points in total.
Alan is the winner in round 5!
<Round 6>
It’s Steve’s turn.
How strong will you throw (0-5)?
> 4
⚁⚂⚁
You earned 0 points, 0 points in total.
It’s Bill’s turn.
How strong will you throw (0-5)?
> 3
⚅⚅⚅
You earned 21 points, 21 points in total.
Bill is the winner in round 6!
======================================
Round Steve Bill Alan
======================================
1 3 21 0
2 21 0 7
3 0 21 0
4 0 0 22
5 0 2 21
6 0 21 0
======================================
Total 24 65 50
======================================
Bunco 1 3 1
======================================
Bill won 3 rounds, scoring 65 points, with 3 Buncos.
Congratulations, Bill! You win!
Users can check the leader board to keep track of their performance. The leader board will show the
list of all registered players with their details, including their name, the number of games played, the
number of games won, and the number of chips remaining. The list must be sorted in the order of the
number of chips, and if having the same number of chips, then in the order of winning rate (i.e., the
number of games won divided by the number of games played).
Additional Requirements
The aim of the assignment is to allow you to practise creating an object-oriented design using object-
oriented concepts such as abstraction, encapsulation, inheritance, and polymorphism.
You will need to develop a class design using UML class diagrams in UMLet based on the
requirements above and in the remainder of this specification. The focus of the assignment is on
identifying classes and applying appropriate relationships between the classes, attrbiutes and
methods of the classes. The UML class diagram MUST include all necessary classes, attributes and
methods, and all relationships between classes. Also, visibility, data types, and cardinalities must
be specified in detail.
The UML design should be designed in such a way that code is reused and can be extended easily.
Your design must presume the following Python code will run the application software you developed:
atd = AllThatDice()
atd.run()
Think of how this run() method will be the starting point and call methods of other objects in the
system to identify classes, their methods and attributes, and their relationships based on reading the
assignment task specification.
The description in this document should provide enough details for designing the UML class diagram.
However, if you have any doubt or question while developing the UML class diagram, please contact
the Course Facilitator for clarification through either online forum on the course website or through
email.
Work Plan
To complete this assignment, you will need to perform the following steps:
The marking of this aspect will focus on the appropriate classes and relationships, separation of
concerns, and good naming that captures the requirements and concepts described in this
assignment specification document.
After completing the design, make sure to include a note with your student details (Full name,
Student ID, and email ID) in the diagram, then save it into a uxf file and submit it to the submission
link on the course website.
Submission Details
You MUST submit your UML Class Diagram in a uxf file to the submission link on the course website.
The UML class diagram MUST be generated from the UMLet or UMLetino modelling tool: a photo of
a hand-drawn diagram will NOT be accepted. The submission must include a note with your
student details (Full name, Student ID, and email ID).
The submission is due by the date and time specified on the submission link on the course website.
There will be no extensions or late submissions for this course without one of the following
exceptions:
1. A medical certificate is provided that has the timing and duration of the illness and an
opinion on how much the student’s ability to perform has been compromised by the illness.
Please note if this information is not provided the medical certificate WILL NOT BE
ACCEPTED. Late assessment items will not be accepted unless a medical certificate is
presented to the Course Facilitator. The certificate must be produced as soon as possible
and must cover the dates during which the assessment was to be attempted. In the case
where you have a valid medical certificate, the due date will be extended by the number of
days stated on the certificate up to five working days.
2. A Learning and Teaching Unit councillor contacts the Course Facilitator on your behalf
requesting an extension. Normally you would use this if you have events outside your
control adversely affecting your course work.
3. Unexpected work commitments. In this case, you will need to attach a letter from your work
supervisor with your application stating the impact on your ability to complete your
assessment.
4. Military obligations with proof.
Applications for extensions must be lodged with the Course Facilitator before the due date of the
assignment, or as soon as possible after the incident took place.
Note: Equipment failure, loss of data, ‘Heavy work commitments’ or late starting of the course are
not sufficient grounds for an extension. Make sure you make a back-up of your .uxf file frequently,
especially when working on a web-based UMLetino.
Marking Criteria
Your UML Class Diagram will be marked against an expected design. The focus is on the correct
identification of classes and their relationships, and capturing enough details from this assignment
specification. Penalties will be applied if the design is not submitted in the correct format.
Criteria Mark
Submission not in appropriate format, missing student details, or not answering questions
in person during the Week 11 Workshop class will lead to a 0 on the assignment.
Only UMLet/UMLettino drawn diagram including student details in a uxf file is accepted.
Students are reminded that they should be aware of the academic misconduct guidelines available
from the University of South Australia website.
https://i.unisa.edu.au/policies-and-procedures/codes/assessment-policies/