CSC126 Individual Assignment 20232
CSC126 Individual Assignment 20232
INDIVIDUAL ASSIGNMENT
Instructions
Your code must have a comment header consisting of the following:
/*
Name : Your full name
Sid : Your student number
Course : CSC126
Group :
Due Date : 14 June 2023 5:00 pm
Question No :
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
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.
INDIVIDUAL ASSIGNMENT
(Assessment 2)
QUESTION 2
Bloom & Care is a babysitting service based in the Selangor area. During the International
Children’s Celebration Day on 20th Nov 2021, they will give a discount to all the customers
that made a booking on that day or for any coming dates. The payment will be charged
based on the membership status and total hours booked. Details of the charge for members
and non-members are shown in Table 2. An extra 5% discount will be given to all registered
members of Bloom & Care babysitting services.
As a programmer, you are required to write a complete C++ program that will solve the
following problems:
Ask the user to enter membership status (M for member, N for non-member) as input.
If the users enter ‘M’, your program then asks the user to enter the package code and
number of hours they will book the services.
If the users enter ‘N’, your program then asks the user to enter the package code and
the number of hours they will book the services.
Based on the user’s membership status, calculate, and display the total price charged
for each booking made. The charge is calculated based on the details in Table 2 and the
extra discount for each member.
Display an appropriate message if the user enters an ‘Invalid type of package
or package code’.