Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Build a class called Appointment.java. This class should have the following prop

ID: 3848527 • Letter: B

Question

Build a class called Appointment.java. This class should have the following properties: patientld, dentistld, datetime, and procCode. The datetime property should use the MyDateTime class that you built in Lab #1. Also add the appropriate set and get methods, display method, toString method and main method. Main() should be used to test this class. Also add 2 constructors to the Appointment class. One that takes no arguments and initializes the data to all 0's and "" (empty strings). And one constructor that takes all arguments. Lastly in the main() method instantiate an Appointment object by calling the constructor that takes all 4 arguments, then call the display method to display the data. Main Testing Code Appointment a1; a1 = new Appointment("A901", "D201", new MyDateTime(7, 1, 2017, 9, 0, 0), "P114"); a1.disptay();

Explanation / Answer

Hi,

I have provided the code below. Note that for the given code to work, you need MyDateTime class which you have probably made. Feel free to comment if you find any difficulties. Also since you haven't provided how toString and display methods should be implemented, I have provided the default functionality and display method prints toString contents. Also the code is commented so that you can understand it completely. Give a thumbs up if this answer helped you

//Code starts here

//Code ends here

Hope it helps!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote