K OMPUTER
SCHOOL OF COMPUTER SCIENCES
Semester I, Academic Session 2013/2014
CPT111 - Principles of Programming
Assignment 4
For the question below, you are to include the following details:
(i)
(ii)
(iii)
Problem analysis
Design (flow chart or pseudocode)
C++ program code
Solve the problem below:
1.
Create an educational arithmetic guessing game that will allow the player to choose the difficulty level of the game: easy, intermediate or advance level. Easy level will involve numbers between 0 and 10, the intermediate level between 10 and 99 and the advance level between 100 and 999. The arithmetic operators provide by the game is addition, subtraction, multiplication and division. The division will involve quotient and remainder. The user will get 5 points for correct answer and deduct 2 points for wrong answer. The player can decide when to quit the game and the system will provide the following information upon quitting.
Name : Player’s Name
Level of Difficulties : Easy/ Intermediate/Advance
Number of Attempts:
Number of correct scores :
Number of incorrect scores:
Total scores:
INSTRUCTIONS:
Please submit your typewritten/handwritten report by Friday 29 November 2013 by uploading it to ELearning before 12:00 midnight. Please make a cover page with the following information. You can choose to do the assignment with a partner within the same group.
Course:
Name:
Matric No:
Group Number:
The name of the file that you upload must follow this standard: CPT111YOUR NAME/MATRIC NUMBER/Group
Number
Course Policy:
•
All assignments MUST be submitted before/on the given date. Late submissions without prior approval from the lecturer will not be accepted. One grade will be deducted for each day, for students with approval.
•
If a student is found to misuse the amenities given, the permission will be taken away from the student.
•
Plagiarism/pirating and copying are serious academic offence. Students that are found to plagiarize/or copying will get an 'F' for the assignment/report or for the whole coursework grade and will be barred from taking the final examination. Please read your undergraduate Programme
Handbook.