辅导COMP 2034 -Assignment 2调试Python
- 首页 >> OS编程COMP 2034
Software Development
UniSA STEM
The University of South Australia
May 2020
- 2 -
Contents
Introduction
Graduate Qualities
Specifications and Requirements
Submission Requirements
Extensions and Late Submissions
Academic Misconduct
Sample Output
Marking Criteria
- 3 -
Introduction
This document describes the second programming assignment for COMP 2034 Software
Development course.
The assignment is intended to provide you with the opportunity to put into practice what
you have learnt in the course by applying your knowledge and skills in Object-Oriented
Programming with Python programming language. The task is to develop a program with
multiple modules which allows users to play the game of Rock-Paper-Scissors or the game of
In-between against the computer and maintains information on players. Player information
will be stored in a text file that will be read in when the program commences. Once the
application has read the initial player data, it should allow the user to interactively query
and manipulate the player information as well as play games against the computer.
This assignment is an individual task that will require an individual submission. Each
student is required to submit your work via learnonline before Monday 15 June 2020,
10am (swot-vac week).
You will also be required to present your work to your supervisor during your allocated
Zoom session held in the swot-vac week of the study period. Important: You must attend
your allocated session (schedule to be announced on week 12) in order to have your
assignment marked.
This document is a specification of the required end product that will be generated by
implementing the assignment. 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.
- 4 -
Graduate Qualities
By undertaking this assessment, you will progress in developing the qualities of a University
of South Australia graduate. The Graduate qualities being assessed by this assignment are:
• The ability to demonstrate and apply a body of knowledge (GQ1) gained from the
lectures, practicals, and readings. This is demonstrated in your ability to apply
programming theory to a practical situation.
• The ability to effectively problem solve (GQ3) using Python and Object-Oriented
Programming concepts to complete the programming problem. Effective problem
solving is demonstrated by the ability to understand what is required, utilise the
relevant information from lectures, the text book and practical work, write Python
code, and evaluate the effectiveness of the code by testing it.
• The use of communication skills (GQ6) by producing source code that has been
properly formatted; and by writing adequate, concise and clear comments.
Communicating with others through demonstrating and explaining the program
code to the instructor.
- 5 -
Specifications and Requirements
Your solution MUST adhere to the specifications and requirements described in this
document.
It is recommended that you develop this assignment in stages and make back-ups of your
code regularly not only for development purpose, but also as an evidence of original work.
Your program must be developed using multiple Python modules, with the number and
names of all the files strictly adhering to the specifications below.
Your program must be developed with six Python files, three of them provided, and three of
them newly written by yourself. These files must be:
• assignment2.py - This file contains the main part of your program to import the
other modules and run. It allows the user to interactively query and manipulate the
player information and play games. (PROVIDED)
• player.py - This file contains Player class definition to store a single player
information.
• leaderboard.py - This file contains LeaderBoard class definition to manage
players on a leader board.
• game.py - This file contains Game class definition which is the base class of other
game classes. (PROVIDED)
• rpsgame.py - This file contains RockPaperScissors class definition which
implements a Rock-Paper-Scissors game. (PROVIDED)
• inbetweengame.py - This file contains Inbetween class definition which
implements an In-between game.
Three files (assignment2.py, game.py, rpsgame.py) will be provided on the course
website along with this document and they must be used without any modification. To
solve this assignment, you must create and write three additional files player.py,
leaderboard.py, and inbetweengame.py.
Program Behaviour
When your run the program assignment2.py, it will create an instance object of the
LeaderBoard class you define and call the load() method which should load in player
information from a file called players.txt (provided on the course website). If the
program has loaded the data successfully, the following message will be displayed:
Players info successfully loaded.
Or if the program fails to load the players info, the following message will be displayed:
ERROR: Cannot load players info.
Your program will enter the command mode after the player information has been loaded
from the file. In the command mode, the program reads user input for a command with the
following prompt shown on the screen:
- 6 -
Please enter a command [list, add, remove, play, winner,
quit]:
The program will allow the user to enter commands and process these commands until the
‘quit’ command is entered.