Description
Workshop 1
Notes:
i. Each task should be presented during the lab, demo worth 70% of the workshop marks and code uploading worth the other 30%.
ii. Make sure you have all security and check measures in place, like wrong data types etc., no need to implement Exception as we haven’t covered yet. There are other ways to handle bad input data.
iii. Given output structure is just for student to have a glimpse what the output can look, student are free to make the output better in any way.
iv. The final should be submitted by the midnight to avoid late penalties which are 10% each day late.
Other inputs can be given during demo, so make sure you test your program properly.
Task 1: Design a class named MyDate. The class contains:
• A constructor that constructs a MyDate object with the specified year, month, and day.
• Three getter methods for the data fields year, month, and day, respectively.
Write a test program that creates two MyDate objects (using new MyDate() and new MyDate(34355555133101L)) and displays their year, month, and day.
Write a test program that creates a Person, Student, Employee, Faculty, and Staff, and invokes their toString() methods.
Reviews
There are no reviews yet.