You are on page 1of 4

University of Central Punjab

ITC Project

Due: 31/01/2021 at 11:59 pm

Objective

To get practice almost all the concepts taught so far.

Problem: Educational Software


Your little brother is having trouble with arithmetic. Your parents realize that after taking a few
weeks of programming course, you could potentially write a program that will allow him to practice
his arithmetic skills.

Your program should prompt your brother with the following menu:

P: Practice

Math S: Show

Score Q: Quit

When “P” is chosen, your program should then prompt him for the difficult level. The difficulty level
can be easy, medium, or hard. The difference between easy, medium, and hard is simply that in
easy level, the operand of each question should be from -10 to 10. In medium, they can be
between -50 and +50. And in hard, they can be between -100 and 100.

Then it should prompt him with the desired number of problems. The questions can be addition,
subtraction, division, or multiplication. You really want to mix things up so there is no specific
order. Rather the program should randomly pick a question from addition, subtraction, division, or
multiplication. Furthermore, the operands for the questions should be randomly generated as well.
For division, you want to ensure the answer is a whole number.

Your program should keep track of how many answers are wrong and belong to which category
(Addition, Subtraction, Multiplication 0r Division).

At the end of the questions, the program should display:

- Score (See scoring details)


- How many questions the user got correct
- Breakdown of how many the user got correct for each type of arithmetic
- Areas where the user needs to improve. This would be any type in which the user had a
single mistake (you really want your brother to score a 100 in the test).

Selecting “S: Score” should print out the last score the user had. If there is no score to display, then
display: “No score found”.

The menu should repeat unless the user chooses “Q: Quit”

Scoring Details

Each question’s score will depend on the difficulty levels. (For example: easy: 2 marks, medium:
4 marks and hard: 5 marks). Show the individual difficulty question’s scores.
Sample Output
Please make a selection from the following:

P: Practice Math

S: Show Score.

Q: Quit.

What do you want to do: S

No score found.

What do you want to do: P

What difficult level do you want:

E: Easy

M: Medium

H: Hard

Enter difficult level: H

How many problems do you want? 4

What is 21+86? 107

Correct, great job!

What is 92/2? 44

Sorry, that's incorrect, the answer is 46.

What is 86-70? 16

Correct, great job!

What is 51*4? 204

Correct, great job!

Your score is 15/20

You got 3/4 questions correct.

Addition Subtraction Multiplication Division


1/1 1/1 1/1 0/1

Need more practice with:

Division

Please make a selection from the following:

P: Practice Math

S: Show Score.

Q: Quit.

What do you want to do: S

Your last score was 15/20.

Please make a selection from the following:

P: Practice Math

S: Show Score.

Q: Quit.

What do you want to do: Q

Thank you for practicing!

Submission instructions
You need to submit the c++ file only.

Notes on Grading
- All variables should have informative names.
- Your input/output should match the examples.
- Every program (parts) must have comments. There should be header comments in your program
including your name and a brief introduction of the program.
- Any plagiarism/cheating would be strictly dealt with.
- Use correct indentation.
- Your program will be evaluated by both of your course instructor and lab instructor.
- Both of the group members should have complete understanding of the project. Any question can be
asked from any one.

You might also like