Answered step by step
Verified Expert Solution
Link Copied!

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 1. 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 webd4201.lastnamefirstinitial package (all lowercase and lastnamefirstinitial should be your last name and first initial).
NOTES:
ZIP up the webd4201 folder that exists in your src folder (this will include your source code including your lastnamefirstinitial ) DO NOT use *.7z 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 attributes/methods/constructors in your project files must have Javadoc comments for full marks
1 mark penalty per class, interface, constructor, method, attribute, class constant that is missing Javadoc comments
-0.5 mark penalty per class, interface... that Javadoc comments are incomplete
1. Create a Java interface named CollegeInterface.java, this interface should:
a. include constants named:
i. COLLEGE_NAME of type String that stores Durham College
ii. PHONE_NUMBER of type String that stores (905)721-2000
iii. MINIMUM_ID_NUMBER of type long (primitive) that stores 100000000
iv. MAXIMUM_ID_NUMBER of type long (primitive) that stores 999999999
v. MINIMUM_PASSWORD_LENGTH of type byte that stores 8
vi. MAXIMUM_PASSWORD_LENGTH of type byte that stores 20
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).
2. 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. DEFAULT_ID of type long that stores 100123456
ii. DEFAULT_PASSWORD of type String that stores password
iii. MINIMUM_PASSWORD_LENGTH of type byte that stores 8
iv. MAXIMUM_PASSWORD_LENGTH of type byte that stores 40
v. DEFAULT_FIRST_NAME of type String that stores John
vi. DEFAULT_LAST_NAME of type String that stores Doe
vii. DEFAULT_EMAIL_ADDRESS of type String that stores john.doe@dcmail.com
viii. DEFAULT_ENABLED_STATUS of type boolean that stores true
ix. DEFAULT_TYPE of type char that stores s
x. ID_NUMBER_LENGTH of type byte that stores 9
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 getter(accessor) and setter(mutator) methods. These accessor/mutator 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 (i.e. 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 (i.e. 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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What committees does the person serve on?

Answered: 1 week ago