COLLEGE OF NATURAL & APPLIED SCIENCES, ALLIED HEALTH
AND NURSING
DEPARTMENT OF COMPUTER & INFORMATION SCIENCES
UNDERGRADUATE DEGREE COURSEWORK
SPRING 2022
COURSE NAME: Principles of Programming II
CODE: CPTR242
DUE DATE: MARCH 9, 2022
WEIGHTING: 70 Marks
EXAMINATION TYPE: ASSIGNMENT #2 – GROUP (OOA & OOD)
INSTRUCTIONS: This is a group coursework. Groups should consist of two students (no
more than and no less than 2 students per group). Groups are required to answer all questions
given. Number each answer clearly and pay attention to clarity and case sensitivity of any code
you write. This coursework is based on object-oriented analysis, object-oriented design as well
as creating classes in Java.
Problem Scenario (written requirements)
Tax Administration Jamaica (TAJ) has approached the Department of Computer and
Information Sciences to identify programmers to assist with the development of a new system
to manage the issuing of driver’s licenses. TAJ captures the following data, taxpayer registration
number (TRN), Collectorate which has a code and parish (e.g., 011 Kingston), first, middle, and
last names, date of birth, gender, current address, expiry date and control number for all
licensees. The control number is unique for each license and is used by TAJ staff and Law
enforcement officers to detect fraudulent licenses.
The process starts when an applicant applies for a Learner Permit. The Learner Permit allows
applicants seventeen (17) years and older to operate any type of vehicle, while under
supervision. TAJ records the designated supervisor for all Learner Permits.
To get a General or Private license, a holder of a valid Learner Permit must complete a
government administered test, if successful the General or Private license can be issued. The
General license has details of the vehicle’s max laden weight in kg and expires three (3) years
after the issue date. The Private license expires five (5) years after the issue date and has details
of the type of vehicle the licensee is licensed to drive.
NB: All date attributes should be treated as regular string data type, not as a Date class.
1. Perform an Object-Oriented Analysis (OOA) on the given written requirements; identify
the five (5) most appropriate classes, showing the classes in a table which should have
columns for class name, attributes, and methods. [25 marks]
2. Draw a UML class relationship diagram, showing how the classes are related (i.e.,
through inheritance, composition, aggregation, etc). Do not put any detail inside the
classes in your diagram except the class name. [10 marks]
3. Draw a detailed UML class diagram depicting a super class identified from the given
problem, ensure the primary constructor, and all accessors and mutators are shown.
Remember to show the appropriate access specifiers for all members of the class.
[10 marks]
4. Write the Java code to implement the super class represented by the detailed UML class
diagram created in part 3, ensure that the Java code includes a ‘toShow’ method; the
method should be created to support showing the attributes of the class. [10 marks]
5. Draw a detailed UML class diagram depicting a derived or sub class identified from the
given problem; ensure the primary constructor, unique accessors and mutators for the
derived class are shown. [7 marks]
6. Write the Java code to implement the sub class represented by the detailed UML class
diagram created in part 5. Override the inherited ‘toShow’ method to support showing
all attributes of the sub class. [8 marks]
*** TOTAL 70 MARKS ***