Java.M.A301 (Advanced OOP)
Java.M.A301 (Advanced OOP)
T ra in in g As s ig nmen ts
Version 1.1
Hanoi, 06/2019
Training Assignment Java Issue/Revision: x/y
RECORD OF CHANGES
Contents
Advance OOP .................................................................................................................................4
Objectives: ...................................................................................................................................4
Assignment Specifications: ..........................................................................................................4
Business Rules: ...........................................................................................................................4
Problem Descriptions: ..................................................................................................................5
Guidelines:...................................................................................................................................5
CODE: JAVA.M.A301
TYPE: MEDIUM
LOC: 200
DURATION: 120 MINUTES
Advance OOP
Objectives:
» Understand and practise with Classes, Objects, Inheritance, Encapsulation.
» Understand and practise with Polymorphism, Abstraction.
Assignment Specifications:
For the class hierarchy is as follows, the trainee let's create the java classes install this class diagram to be
able to relationship between it.
» The Person is an abstract superclass and has four fields: fullName, gender, phone, email.
» The Student is a concrete subclass of Person and adds 3 new fields: studentId, theory, practice.
Provide calculateFinalMark() method to calculate the final mark of a student by an average of theory
and practice.
» The Teacher also is a concrete subclass of Person and adds two new fields: basicSalary, subsidy.
Provide method calculateSalary() to calculate the teacher’s salary by recipe:
Salary = Basic salary + Subsidy.
Business Rules:
» birthDate: correct date format (dd/MM/yyyy).
Problem Descriptions:
Create a class named PersonManage that contains the main method will be using the Person class
and its subclasses allow selecting the functions as follows:
a. Input data from the keyboard: create an array of 10 Person of all types as mentioned above.
b. Update student: update student info by entering studentId.
c. Display teacher: displays information about teachers, who has a salary higher than 1000$.
d. Report: display all students and their final mark, who qualify to pass the course (final mark >= 6).
Guidelines:
Create a project named Java.M.A301:
o Package fa.training.entities that contains Person, Student and Teacher class.
o Package fa.training.utils that contains Validator class for validation.
o Create a new package named fa.training.main contains PersonManage class.
--THE END--