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

Calendar Program Write a program to design an appointment calendar. An appointme

ID: 3785833 • Letter: C

Question

Calendar Program

Write a program to design an appointment calendar. An appointment includes a description, date, starting time, and ending time. Supply a user interface to add appointments, remove canceled appointments, and print out a list of appointments for a particular day.   Appointments should not be duplicated for a given time and date.

Include a class AppointmentMenu to print the menu to the screen and accept user input. AppointmentMenu creates an AppointmentCalendar and then calls the appropriate methods to add, cancel, show, or quit.

Include a class AppointmentCalendar that is not coupled with the Scanner or PrintStream classes. (In other words, all println statements should be in AppointmentMenu.) AppointmentCalendar will include an arrayList of Appointments, a method to add Appointments, a method to cancel Appointments, and return the Appointments for a selected day.

Include a class Appointments which holds the input of description, date, and time. It should have a method to format the output for printing by the AppointmentMenu, a method to check to see if two appointments are equal so an appointment is not duplicated for a given date and time, and a method to check for a certain date when show and cancel are called.   

Be sure to include any other methods including any accessor methods that you need to complete this program using the design process described in Chapter 12.

Your main class should be called AppointmentSystem. Use the code below:

Here is a sample program run. (bold items are sample user inputs).

How do I write this program in JAVA not C++ ? Thanks

Explanation / Answer

import java.io.IOException;

import java.sql.SQLException;

/**

   A system to manage appointments.

*/

public class AppointmentSystem

{

    public static void main(String[] args)

         throws IOException, SQLException, ClassNotFoundException

   {  

      if (args.length == 0)

      {  

         System.out.println("Usage: java AppointmentSystem propertiesFile");

         System.exit(0);

      }

      SimpleDataSource.init(args[0]);        

      AppointmentMenu menu = new AppointmentMenu();

      menu.run();

   }

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