Assignment 1: Program Studentman: 1. Requirement
Assignment 1: Program Studentman: 1. Requirement
1. Requirement <<interface>>
Comparable
Program StudentMan of a flower shop captures and processes
data about an entity named Student and two specific types of
Student named UndergradStudent (undergraduate student) a1_Sid
108 + 1 109 -
name String T F - - 50
phoneNumber String T F - - 10
address String T F - - 100
Specific to PostgradStudent
gpa Float T F 0.0 4.0 -
2. Tasks
1. Create a package named a1_Sid as shown in Figure 1, where Sid is your student id. For
example, if your student id is 123456789 then the package name is a1_123456789. You will
need to use this package to hold all the Java classes that you create for the program.
IMPORTANT: Failure to name the package as described will result in an invalid program.
SE - Assignment 1 1
2. Specify and implement class Student with all the essential attribute(s) and operations.
Note: this class must use exceptions where suitable to increase code robustness.
3. Specify and implement class UndergradStudent with all the essential attribute(s) and
operations.
Note: this class must use exceptions where suitable to increase code robustness.
4. Specify and implement class PostgradStudent with all the essential attribute(s) and operations.
Note: this class must use exceptions where suitable to increase code robustness.
IMPORTANT: The essential mutator and observer operations of the same attribute affect one another.
An error in one operation affects the validity of the other operation.
3. Submission
Create a zip-compressed file containing just the folder of the package specified in Task Error:
Reference source not found. You must name the file as follows: a1_Sid.zip, where Sid is your student
id.
Submit your file to the designated submission box for this assignment.
IMPORTANT: Failure to name the file as described above will result in an invalid program. In
particular, ONLY the ZIP format is accepted. Other formats are NOT accepted.
SE - Assignment 1 2