Lab Guides: Java SE 8 Programming Language
Lab Guides: Java SE 8 Programming Language
Lab G ui des
Contents
Long Lab 1 – Option 1: Java I/O Fundamentals...............................................................................4
Objectives:.................................................................................................................................... 4
Lab Descriptions:.......................................................................................................................... 4
Business Rule:.............................................................................................................................. 4
Functional Requirements:............................................................................................................. 5
Screen Design:............................................................................................................................. 5
Guidelines:.................................................................................................................................... 7
Lab Guides Java SE 8 Programming Language
» Four private instance variables: id (String), name (String), phone (String), gender (String), and gpa
(double).
» One constructor to initialize the id, name, email, and gender with the given values. Also including
getter and setter method.
And, a class called Course with the following information:
» Five private instance variables: id (String), title (String), student (of a class Student you have just
created), credit (double), and enrollment (int).
» One constructor to initialize all the given values. Also including getter and setter method. -
Implements Statistical interface.
Finally, an interface Statistical:
» For Course, it will return the summary of how many students get grade A, B, C, and D. You will use
Map for this case.
Business Rule:
d. The program has a method to search for courses that a student has taken by him/her id.
e. Write a method to remove a course from course file.
f. Write a method to get the ranking of all the courses
Screen Design:
---------------------------MENU-------------------------
1. Create new Course
2. Save to File
3. Sort by Id
4. Find by Student
5. Remove course
6. Course Statistic
7. Exit
Select: 1
Enter course id:
JA001
Enter course title:
JAVA
Enter course credit:
2
Enter course enrollment:
2
----Enter Student in the Course----
Enter student id:
123456
Enter student name:
DUNG
Enter gender:
MALE
Enter gpa:
8
Enter phone:
---------------------------MENU-------------------------
1. Create new Course
2. Save to File
3. Sort by Id
4. Find by Student
5. Remove course
6. Course Statistic
7. Exit
Select: 1
Enter course id:
JA001
Enter course title:
JAVA
Enter course credit:
2
Enter course enrollment:
2
----Enter Student in the Course----
Enter student id:
123456
Enter student name:
DUNG
Enter gender:
MALE
Enter gpa:
8
Enter phone:
Select: 3
Select: 4
Select: 6
Guidelines:
Internal use 5/15
Lab Guides Java SE 8 Programming Language
» Step1. Create a project named as below:
» Step2. Create package that contains Course, Student, CourseTitleCompare, Statistical classes:
Statistical interface:
Course class:
o Add getter/setter
Student class:
o Add getter/setter
CourseTitleCompare class:
Constant class
Validator class:
PhoneFormatException class:
InvalidIdException class
StudentService class
CourseService class:
CourseManagement class
-- THE END --