Java.M.A501
Java.M.A501
T ra in in g As s ig nmen ts
Version 1.1
Hanoi, 06/2019
Lab Guides Java Basics Issue/Revision: x/y
RECORD OF CHANGES
Contents
Day 6. Assignment 5: Project Guides ..............................................................................................4
Objectives: ...................................................................................................................................4
Specifications:..............................................................................................................................4
Business Rules: ...........................................................................................................................4
Functional Requirements: ............................................................................................................4
Screen Requirements: .................................................................................................................5
Guidelines:...................................................................................................................................5
CODE: JAVA.M.A501
TYPE: MEDIUM
LOC: 190
DURATION: 180 MINUTES
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.
Customer Order
» Default constructor.
» One constructor to initialize the name, phone number, address and list of orders with the given values.
Getter and setter methods.
And, a class called Order is designed as follows:
» Two private instance variables: number (String), date (Date).
» Default constructor.
One constructor which constructs an instance with the values given. Gettes and setter methods.
Business Rules:
Functional Requirements:
a. Write a method to enter customer data with a her/his list order, users will be asked whether to continue or
finish.
Finish typing data when the user selects 'n’ or ‘N' (method named: public List<String>
createCustomer()).
b. Write a method to save the entire customer list entered into the “customer.dat” file (method
named public String save(List<String> customers)).
c. The program has a method to get all of customers (method named public List<String>
findAll()).
d. The program has a method to display data in the following format: (method named: public void
display(List<String>)).
e. The program has a method to search order by customer (method named public List<String> search(String
phone)).
f. Write a method to remove a specific customer by phone number from customer file (method named public
boolean remove(String phone)).
Screen Requirements:
Guidelines:
» Create a new project named Java.M.A501.
» Package fa.training.entities that contains two classes: Customer, Order.