Instruction
You are to build the Advisee class. Begin by creating the UML diagram that includes the following:
The fields necessary to maintain an advisee:
o name, string (default value ETSU Student) – this is the name of the student advisee
o student id, string (default value E#######) – this is the student id for ex. E0123456
o concentration, string (only available concentrations are CS, IS, IT) (default value XX) – this is the student’s major concentration. This is for Computing majors only at this point.
o number of hours completed, int (default value 0) – this is the number of college credit hours the student has completed
o advisor, string (default value No Advisor) – this is the name of the advisor
o major sheet, boolean (default value false) – this tells if they have filed their major sheet for graduation
o intent to graduate, boolean (default value false) – this tells if they have filed their intent to graduate
Constructor methods
o A default constructor (should set all attributes to default values as shown above)
Note: the constructor methods should call the appropriate set methods rather than assigning values directly. For example, in the constructor, instead of assigning the default value for the name directly using name=“XXX XXXXX” call the setName method instead sending it the values for the default name setName(“XXX XXXXX”);
o A constructor accepting a value for all attributes
o A copy constructor
Accessor and mutator methods for each attribute
o The mutator for concentration should only allow the following values for concentration:
CS, IS, IT (capitalization matters…it can come in upper or lowercase, but should be stored as uppercase)
If something other than these values is sent to the mutator, it should be assigned XX instead.
o The mutator for the student id should only allow student id’s that are 8 characters long and begin with an E
If something other than these values is sent to the mutator, it should assign the default value instead (E#######)
Methods to perform the following operations (as mentioned above)
o determine what a student advisee’s classification is based hours completed
should be called getClassification
returns the string classification (It should return one of the following strings: Freshman, Sophomore, Junior or Senior)
The classification can be determined as follows:
for an undergraduate: Freshman < 30 hours, Sophomore 30-59 hours, Junior 60-89, Senior 90 and up
o determine if a student has met the requirements to graduate
should be called metGraduationRequirements
returns a boolean – true if they have met all requirements, false if they have not The graduation requirements are as follows:
student must have completed at least 120 credit hours
student must have filed an intent to graduate
student must have filed a major sheet
o create a message that will tell whether or not the student has been cleared to graduate
should be called clearedToGraduateMsg
returns the string message stating whether or not they have been cleared to graduate based upon whether or not they have met the graduation requirements
If the student has met all graduation requirements, the message should state “Yes – all requirements have been met”
If the student has not met all graduation requirements, the message should state “No – “ followed by as many of the following that apply:
not enough hours;
not completed major sheet;
not filed intent to graduate
(See the example screenshots below for examples of the output)
Note: this method does NOT display the statement, it simply creates a string that holds the information in it. This string will be returned to the calling method and the calling method may then display the string.
All output will be done using the JOptionPane message boxes....