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

CSC404 – PROGRAMMING II

INDIVIDUAL ASSIGNMENT

This assignment is designed to attain the followings:

Course Learning Outcomes:


CLO2 Perform appropriate programming skills in selected programming tasks.

Due date : 26 MAY 2023, FRIDAY before 3:00 PM.

Weightage : 20 % of the overall assessment.

Environment : You are required to do this assignment in a C++ environment as specified for
each component.

Instructions
• Your code must have a comment header consisting of the following:
/*
Name : Your full name
Sid : Your student number
Course : CSC404
Group :
Due Date : 26 May 2023 3:00 pm)
Program Description:
*/

• You are required to submit documentation in the form of a softcopy (PDF and .cpp) which
consists of:
o cover page
o source code
o output screenshot

• Please save your assignment in PDF format and rename it as:


YourStudentID_GroupClass_Assignment.pdf

• You are required to submit your softcopy in UFUTURE.

• Students are allowed to refer to any materials (lecture notes, internet, books, source code
examples).

• Cheating is forbidden. Discussion with friends is considered cheating. Should you have
any questions, please ask your lecturer.
• If your answer is found similar to other students' answers, your lecturer deserves the right
to penalize your work. E.g., if you and the other three students have similar answers, each
of you receives 20 marks. 20 marks will be divided by 4, so each of you receives 5 marks.

• Please consult your lecturer(s) if you face any problems.

• Late submission and plagiarism will be penalized.


QUESTION 1
Kuching Digital Community Run is going to be held in the next coming holiday season. The
following table shows the details:

Category Citizen Cost Distance Time Limit


Malaysian RM60
Adults 5km 1 hour
Others USD40
Malaysian RM20
Kids 3km 45 minutes
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, citizenship, the number of participants 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: USD1
= RM4].
• Count the number of adults and kids involved in the whole program.
• You are required to include at least 3 FUNCTIONS in your program.
• Write a complete C++ program and for each user generate a receipt using the format
in the following example:

KUCHING DIGITAL COMMUNITY RUN 2023

NAME : AMIN BIN AMINUDDIN


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

THANK YOU

- Total number of adults : XX


- Total number of kids : XX
- Grand Total = RMXXX.XX

You might also like