subject

Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An appointment has the date of an appointment, the month of an appointment, the year of an appointment, and the description of an appointment (e. g., "see the dentist"). In other words, four major instant variables in these classes. Then, write a method occcursOn(year, month, day) that checks whether the appointment occurs on that date. Ensure to have a test program to test your classes. In your test program, you should create a list of appointments using the concept of polymorphism as your appointment pool. In other words, creating multiple objects using your subclasses of Onetime, Daily, and Monthly. Once you have those appointments available, allow the user to input day, month, and year to check whether the day of the month matches and print out the information of that matched appointment. For example, for a monthly appointment, you must check whether the day of the month matches. Have the user enter a date and print out all appointments that occur on that date.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
How do i get rid of my member ship for
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
When is it most apprpriate for a development team to change the definition of done
Answers: 1
You know the right answer?
Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An appointment has th...
Questions
question
Mathematics, 12.04.2021 16:50
question
Mathematics, 12.04.2021 16:50
question
Mathematics, 12.04.2021 16:50
Questions on the website: 13722363