develop a simple software to help the clinic processes the transactions for vaccination appointments. This project uses the IDE console as the user interface and utilizes the Java standard input and output to read the transactions and write the results. A transaction in this project is defined as a line of data entered through the console. It represents an operation the user performs to manage the appointments. Please see the attachment for more details. Use “General Rules” when working on this project
A clinic is providing the vaccination service at 5 different locations in New Jersey.
Bridgewater, 08807, Somerset County
Piscataway, 08854, Middlesex County
Princeton, 08542, Mercer County
Morristown, 07960, Morris County
Union, 07083, Union County
develop a simple software to help the clinic processes the transactions for vaccination
This project uses the IDE console as the user interface and utilizes the Java standard input and
output to read the transactions and write the results. A transaction in this project is defined as a
line of data entered through the console. It represents an operation the user performs to
manage the appointments.
A transaction is a command line that always begins with a command, in uppercase letters, and
followed by severaldata tokens delimited by spaces. The user shall be able to book or cancel
appointments. The software shall provide the functionality of displaying all the scheduled
appointments sorted by the zip codes or by the patients, in ascending order. Commands are
case-sensitive, which means the commands with lowercase letters are invalid. You are required
to deal with bad commands not supported, or you will lose 2 points for each bad command not
handled. Your software must support the following commands.
• B command, to book an appointment and add the appointment to the schedule. A schedule
contains a list of appointments. Each appointment shall include the information of the patient,
date, time, and location in county name. Below is a sample transaction for booking an
appointment. You can assume that the user will always enter enough data tokens to book an
appointment in the format shown below.
B 8/31/1978 Jane Doe 7/19/2022 9:15 middlesex
The above transaction starts with the B command, including the patient’s date of birth,
first name, last name, appointment date, time and the location. The dates shall be given in
mm/dd/yyyy format, and the times shall be given in hh:mm format, where hh represent the hours
in a 24-hour format, and mm represent the minutes. Appointment times are given with a
15-minute interval, the first appointment of a day is 9:00 and the last appointment of a day is
16:45. County names are not case-sensitive. The system shall allow a patient to schedule
multiple appointments, as long as they are on different days. You should not allow the
appointment to be added if one of the conditions below happens. See sample output for the
error messages to display.
1. A date is not a valid calendar date.
2. The date of birth is today or a future date.
3. The appointment date is today or a date before today, or a date beyond this year.
4. The time is not a 15-minute interval and outside of the range of the appointment times of the
5. An appointment with the same patient, timeslot and location is already in the schedule.
6. The specified timeslot (same date and time) at the specified location has already been taken.
7. The location with the county name is not a valid location.
8. The user is booking an appointment with the same patient and date but a different location
with an existing
• C command, to cancel an appointment and remove the specified appointment from the
schedule, for example,
C 8/31/1978 Jane Doe 7/19/2022 9:15 middlesex
The above transaction removes an appointment from the schedule. See sample output for the
messages to display.
• CP command, to cancel all appointments of a given patient and remove all the appointments
for this patient from the schedule. A patient is uniquely identified by his/her date of birth, first
and last names, for example,
CP 8/31/1978 Jane Doe
• P command, to display all appointments in the schedule to console, with the current order in
• PZ command to display all appointments in the schedule ordered by the zip codes. If two
appointments have the same zip code, display the appointment with an earlier timeslot first.
• PP command, to display all appointments in the schedule ordered by the patients. Sort by
patients’ last names, then first names, then dates of birth. For a patient who has multiple
appointments, display the appointments based on their current order in the array; that is, the
order of the appointments for the same patient doesn’t matter.
• Q command, to stop the program execution and display ” Kiosk session ended.”
1. You MUST follow the Software Projects Coding Standard and Ground Rules posted on
Canvas under “Modules” “Week #1”. You will lose points if you are not following the rules.
2. There are sample input and output at the end of this document for your reference. The
graders will be using the sample input as the test cases to test your project. Your project should
be able to take the sample input in batch with the same sequence without getting any
exceptions and without terminating abnormally. You will lose 2 points for each incorrect output or
3. Each Java class must go in a separate file. -2 points if you put more than one Java class into
4. Your program MUST handle bad commands! -2 points for each bad command not handled.
5. You are not allowed to use any Java library classes, except Scanner, StringTokenizer,
Calendar and DecimalFormatt classes. You will lose 5 points for each additional Java library
class imported, with a maximum of losing 10 points.
6. When you import Java library classes, be specific and DO NOT import unnecessary classes
or import the whole package. For example, import java.util.*;, this will import all classes in the
java.util package. You will lose 2 points for using the asterisk “*” to include all the Java classes
in the java.util package, or other java packages, with a maximum of losing 4 points.
7. You MUST include the Java classes in the class diagram below. That is, at least 9 Java
classes. -5 points for each class missing or NOT used. You CAN add necessary constructors,
private methods (helper methods), and other public methods to each class. You should define
necessary constant identifiers and do not use MAGIC NUMBERs. You can also create an
additional class to define all the constant identifiers needed in this project.