RSD (G1)
RSD (G1)
BACS2023
Object-Oriented Programming
Assignment
Programme : RSD
Tutorial Group : G1
Date Submitted to : 10 December 2021
Tutor
Team Members:
No Student Name Student ID Contribution (%) Signature
Total 100 -
Declaration
We confirm that we have read and shall comply with all the terms and conditions of TAR University
College’s plagiarism policy.
We declare that this assignment is free from all forms of plagiarism and for all intents and purposes is my
own properly derived work.
Name : Ng Jun Chen Benedict Yap Gan Eng Kiat Loo Kee Chen Pow Zheng
Zheng-Yi Teng
1
Table of Content
Content Page
Task Allocated 3
General Description 5
Individual Description Based on Own Task 6
UML Diagram 24
Explanation on Encapsulation, Inheritance and Polymorphism 25
Selection Module 25
Billing Module 27
Summary Module 30
Admin Module 31
Schedule Module 35
2
Task Allocated
Selection Module
UML Diagram
3
4
General Description
Our group consists of 5 members which are Ng Jun Chen, Benedict Yap Zheng-Yi, Gan Eng Kiat,
Loo Kee Chen and Pow Zheng Teng. We decided to create a secondary school based track and
field competition enrollment system. In this system, the object-oriented programming and design
which are encapsulation, inheritance and polymorphism are to be implemented.
This enrollment system's target users are secondary school students. In this system, the students
can register to take part in the track and field competition. There are several event categories and
several events in a category and if the school has the intention of adding up the event, by signing
in as administrator can add events for the students to register and have fun. On top of that, admin
also can check on the signed up students info list. After students register their information and
choose the event they want to take part in, they will need the students to pay the bill and a
summary will print out after payment is successful.
5
Individual Description Based On Own Task
Name Description
- Ask if the user want to sign up, check the competition schedule,
admin login or exit the program
Selection Module
- Get contestant info and the event the users wants to take part in
6
After the user enters “1” in the main menu which is sign up, the system
will ask users to input their name first, then identity card(IC) number
followed by gender. All the input areas here contain validation. Such as
name input field cannot contain digits and left blank, identity card number
input field cannot contain character and must be 12 digits based on
Malaysia IC format and gender input field can only enter either ‘m’, ‘f’, ‘M’
or ‘F’ as ‘M’ represent male while ‘F’ represent female. If invalid input
occur, invalid input message will occur as the Selection Module Validation
Screenshots below
7
After the name input field is valid, input IC and IC input contain character,
digits input length did not reach 12 and does not match Malaysia IC format
(third and fourth digit represent the birth month but the input is 13 but a
year only got 12 months so invalid).
After entering the valid IC format, input gender. As the screenshot above
shows, users enter digit ‘1’, characters other than ‘m’, ‘f’, ‘M’ and ‘F’ and
the invalid input message occurs and asks the users to enter again. After
all the info is valid, the system will prompt users the event category menu
and ask the users to choose which category they want and after the users
choose, for example the users enter 1 which mean the user choose
category “Sprints”, then the system will print out the category “Sprints”
event menu as below
8
Selection Module Choose Event 1:
Then the system will ask the users again for the user’s choice. Then after
the users enter their choice, the record will be save down ask the user if
they want to continue sign up or go to billing as screenshot below shows
If the users enter 2 then the progress will start from where the system asks
users to choose the event category since the users had input their info
once and nobody would like to keep on entering their info again and again
if they want to take part in more events.
9
If the users choose “to Billing” then the output as below screenshots will
shows:
10
In the Admin menu, when the user is choosing the option “1” which is the
event details. The system will bring the user to the event page and display
multiple choices such as visiting event status, updating event status,
editing event status and deleting event status.
The user can choose option “1” to view the details about the event
11
The user can choose option “2” to update new data for each event. The
system displays 5 options of the event to let users choose which event
wants to update new data in.
12
Screenshot 4: Update event
The user can choose option “3” to edit the event data. The system displays
5 options of the event to let users choose which data of the event that they
want to edit.
13
Screenshot 5: Edit event
The user can choose option “4” to delete the event data. The system
displays 5 options of the event to let users choose which data of the event
that they want to delete.
14
Screenshot 6: delete event
For the option “5” is to let the user go back to the previous page which is
the admin menu.
At the admin menu, users can choose option “2” to generate the
registration of participant reports. The system will bring the user to the
report page and display multiple choices such as generating report,
15
generating report of male and generating report of female.
The report will display “no record!” when no registration has been
registered in the system.
The user can choose which type of the report that they want to generate
to view from the system.
16
1. Print out all the participant
17
For the option “4” is to let the user go back to the previous page which is
the admin menu.
At the admin menu, users can choose option “3” to logout from the admin
menu and go back to the main menu.
18
Screenshot 11: Logout page
Summary Modules
1. After billing if the user chooses “3” to exit will display the summary
for users to refer their information in summary.
2. Summary displayed will return to the main menu after user keyin
“1”.
Summary display-Screen shot (1)
Schedule Module
19
-Let the user to know about the schedule of each sport events
20
Schedule Module ScreenShot 6
Based on Schedule Module ScreenShot 1, the user can see that there are
5 selections in the menu. Then the user chooses the selection ‘2’ which is
‘Relay’, it will show another menu which like Schedule Module
ScreenShot 2. It will show a different menu when the user selects the
different page like Schedule Module ScreenShot 3. After the user selects
the sport event that he/she wants to see, it will show another menu like
Schedule Module ScreenShot 4. When the user decides to choose the
match he/she wants to see, it will show out the schedule of the match and
ask the user that he/she wants to go back to the schedule or main menu
like Schedule Module ScreenShot 5. If the user chooses 1, it will show like
Schedule Module ScreenShot 1 . If the user chooses 2, it will show like
Schedule Module ScreenShot 6.
Billing module
1. Pay the bill that has just been created
2. Pay the previous bill that already been created
21
In this module users are allowed to pay the bill for the sports they have
been registered in the registration module. Users can pay the bill they
have just created or paid the previous payment that they have not paid.
Screenshot 2.1 is if users enter 1 in the payment menu, the system will
show the payment that is just created. While screenshot 2.2 is user enter
2 in the payment menu, the system will display the bill that is already
created including the bill that is just created and it will display a message
to call the user to enter the bill ID that user wanted to pay.
22
Screenshot 3 is the after the user selected the bill they wanted to pay.
The system will prompt a message to ask the user whether the user
wanted to confirm the payment. If yes, the system will display the total
price and ask users to enter the money to pay. If not, the system will
return to the payment menu.
After the user pay the bill, a message like screenshot 4 will be display.
23
UML Class Diagram
Selection module
24
Name Implementation Description
of Concepts
Encapsulation
25
simply access and update the value of the
variables.
26
27
Billing Module
Encapsulation
28
SuperClass: Bill
SubClass: CreateUpdateBill
SuperClass: CreateUpdateBill
SubClass: Male, Female
29
Figure 1
Polymorphism
Figure 2
If the user only wants the Bill class data the user
can call the method by (Bill)(variable
name).toString(). If the user wants the data that is
implemented in CreateUpdateBill, the user needs
to call the method by (CreateUpdateBill)(variable
name).toString().
30
Summary Module
31
In my SummaryDate i extends the CreatSummary,
SummaryDate is my subclass and CreatSummary is
my super class. It can get all those information,
methods from CreatSummary.
32
Admin Module
33
The subclass (ReportMale) and (ReportFemale) were
extended from superclass (Report). Then the
(ReportMale) and (ReportFemale) will inherit all the data
members and methods from (Report). All the methods
from (Report) can be accessible by (ReportMale) and
(ReportFemale).
Example
Figure 1
35
Figure 2
Figure 3
Figure 4
36
Schedule Module
Encapsulation
37
There are getter and setter methods in the class. the
user cannot get the data directly by calling the
variable because the variable we declared is set
private so getters and setters are implemented to get
and set the object's data.
Inheritance
38
Sprint , Relay, Middle and Long distances, Jump and
Throw.
Polymorphism
39