Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is the first part of Deliverable 1 . It is a review of your previous OOP courses. This needs to be completed as it
This is the first part of Deliverable It is a review of your previous OOP courses. This needs to be completed as it is the foundation for all of the deliverables going forward. You are encouraged to ask questions during lab periods if you are unclear on any of the requirements.
All classes should exist in a webdlastnamefirstinitial package all lowercase and lastnamefirstinitial should be your last name and first initial
NOTES:
ZIP up the webd folder that exists in your src folder this will include your source code including your lastnamefirstinitial DO NOT use z or rar or any other compression scheme there will be penalties otherwise
Be sure to add the generated Javadoc website in the zip file above.
This zip file should be submitted into DC Connect on or before the due date.
You are expected to be in the lab period immediately after the due date to demonstrate your deliverable.
Note: the classes and all attributesmethodsconstructors in your project files must have Javadoc comments for full marks
mark penalty per class, interface, constructor, method, attribute, class constant that is missing Javadoc comments
mark penalty per class, interface... that Javadoc comments are incomplete
Create a Java interface named CollegeInterface.java, this interface should:
a include constants named:
i COLLEGENAME of type String that stores Durham College
ii PHONENUMBER of type String that stores
iii. MINIMUMIDNUMBER of type long primitive that stores
iv MAXIMUMIDNUMBER of type long primitive that stores
v MINIMUMPASSWORDLENGTH of type byte that stores
vi MAXIMUMPASSWORDLENGTH of type byte that stores
b a method header for a method called getTypeForDisplay that takes no arguments but returns a String. This method should be set up so that it is accessible anywhere and an instance method not a class method
Create a User.java class will be used to create objects of the User type, this class should have the following:
a Be coded so that it implements the above CollegeInterface.java
b Has shared class constants NOTE: all of these constants should be set so they accessible to any subclasses, whether they are in the same package or not
i DEFAULTID of type long that stores
ii DEFAULTPASSWORD of type String that stores password
iii. MINIMUMPASSWORDLENGTH of type byte that stores
iv MAXIMUMPASSWORDLENGTH of type byte that stores
v DEFAULTFIRSTNAME of type String that stores John
vi DEFAULTLASTNAME of type String that stores Doe
vii. DEFAULTEMAILADDRESS of type String that stores johndoe@dcmail.com
viii. DEFAULTENABLEDSTATUS of type boolean that stores true
ix DEFAULTTYPE of type char that stores s
x IDNUMBERLENGTH of type byte that stores
xi DF of type DateFormat that formats dates to the DateFormat.MEDIUM for Locale.CANADA
c Have instance attributes named NOTE: all of these attributes should be set so they are only accessible from inside the class:
i id of type long to store the users unique identification number
ii password of type String to store the users password
iii. firstName of type String to store the users first name
iv lastName of type String to store the users last
v emailAddress of type String that will be used to store the users email address.
vi lastAccess of type Date to store the last time the user accessed the system
vii. enrolDate of type Date to store when the user was created in the system
viii. enabled of type boolean to store whether the user is enabled in the system false would mean the user is disabled
ix type of type char to store the users type as a single character
d For each of the instance attributes created above, you are to create correctly name getteraccessor and settermutator methods. These accessormutator methods should set up so that they are accessible from anywhere. NOTE: you can do this simply in Eclipse by creating the attributes and then selecting Source Generate Setters and Getters... and accepting the defaults.
e constructors that should be accessible from anywhere
i a parameterized one that accepts arguments, one each for the types corresponding to the attributes listed above, that places each argument into its appropriate attribute using the setXxx method
ii a default one ie one that does not take any arguments that will set the instance attributes to the public class attributes created above. NOTE: set the enrol date and last access date to today ie the day the program was run For full marks this default constructor should call the parameterized constructor created above using the this keyword passing the class attributes and todays date, using a new Date call for those two arguments
f Create a instance method named toString that overloads the java.Objects toString creates
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started