Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

CSC126 | FUNDAMENTALS OF ALGORITHM DEVELOPMENT & COMPUTER PROBLEM

SOLVING
ASSIGNMENT 3

INDIVIDUAL ASSIGNMENT
(5%)

QUESTION 1

Sparkle Run Kuala Lumpur is going to be held in the next coming holiday season. The
following table shows the details:

Category Citizen Cost Distance Time Limit


Adults Malaysian RM60 5 km 1 hour
Others USD40
Kids Malaysian RM20 3 km 45 min

Others USD15

In order to run the program smoothly, the organizer is hiring you as a programmer to develop
a computer program. In developing the program, you should consider each of the following:

 The user’s name, citizen, the number for each category, and distance should be
entered following the respective INPUT statements. The program will repeat until the
system administrator input is “N” or “n”.
 Calculate the total payment for each user and the grand total for all users.
[Note: USD 1 = RM4]
 Count the number of adults and kids involved in the whole program.
 Write a pseudocode and complete C++ program for each user generate a receipt
using the format in the following example:

SPARKLE RUN KUALA LUMPUR 2019

NAME : AARON BIN AZIZ


CITIZEN : MALAYSIAN
NO. OF ADULT : 2
NO. OF KIDS : 2
PAYMENT :
ADULT : RM120.00
KIDS : RM80.00
TOTAL PAYMENT : RM200.00

THANK YOU VERY MUCH

- Total Number of Adults: XX


- Total Number of Kids : XX
- Grand Total = RMXXXX.XX
CSC126 | FUNDAMENTALS OF ALGORITHM DEVELOPMENT & COMPUTER PROBLEM
SOLVING
ASSIGNMENT 3
QUESTION 2

Given the following data has been collected from 70 respondents on their perception about the
customer service at the counter. The respondent will give a score from 1 to 5 only. The score 1
represents the worst service, while the score 5 represents excellent service.

4 3 5 4 3 2 3 4 3 4
3 4 3 2 2 2 1 2 3 2
4 3 3 4 5 4 3 3 3 4
4 3 4 3 3 3 2 2 2 2
3 3 3 3 3 2 3 2 3 2
2 2 2 1 1 1 2 3 5 1
5 4 3 4 3 3 3 3 3 4

You are required to write a pseudocode and complete C++ program to display the following
output:

Score Total Respondent Percentage


===== ============== ==========
1 ? ?%
2 ? ?%
3 ? ?%
4 ? ?%
5 ? ?%

Average score is ?.
Overall result is ?.

 Determine how many respondents for each score.


 Determine the percentage of each score.
 Determine the average score given by each respondent.
 Determine the overall result. If the average score is less than 4, then the result is
‘Medium’. If the average score is greater than 4, then the result is ‘Excellent’.

SUBMISSION GUIDELINE

Your assignment should follow below specifications.

1. Student need to choose ONE (1) out of two questions given. For the selected question, student need to
provide:
a. Algorithm design: Pseudocode
b. Complete C++ program
c. Sample output
2. Format : Hardcopy
a. Front page cover : LIGHT BLUE (KCS1101M), YELLOW (KCS110N)
(Format page cover as given)

b. Font : Normal text –Arial, C++ program – Courier New


c. Size of Font : 11
d. Spacing : Single Spacing
e. Paper size : A4
3. Please ensure that your submission includes a coversheet and marking rubric.
4. Due Date : 5th December 2019 before 5.00pm
5. Late Submission = minus 2 mark per day
6. PLAGIARISM = 0 mark

You might also like