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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, babbybronx
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
image
Computers and Technology, 23.06.2019 09:00, Riddledjam44623
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, cravens511peeelg
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, Alexaisokay1
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
You know the right answer?
Implement a superclass Appointment and subclasses Onetime, Daily, and Monthly. An appointment has th...

Questions in other subjects: