[SOLVED] COMP90041 Lab 5-Writing Java Class

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab_W5_solution-9ltf84.zip (232.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Workshop Instructions
Writing Java Class

2. Add two constructors to the Appointment class, including a default constructor and a constructor to initialise an Appointment to suitable arguments.

3. Write a driver program, say AppointmentDemo, that tests your Appointment class.

4. Rewrite the mutator method for setting the day in the Appointment class in a way that it has to use the this keyword.

5. Modify mutator methods for setting day, month and year so that only valid values for those instance variables are accepted. For instance, 29/2 is only valid in leap years. Then test the class again (using your driver class) and make sure that it still works and accepts valid values only.
Page 1 of 1

  • Lab_W5_solution-9ltf84.zip