First things first. Project 2: Project 2 A Week in the life of - - PDF document

first things first
SMART_READER_LITE
LIVE PREVIEW

First things first. Project 2: Project 2 A Week in the life of - - PDF document

First things first. Project 2: Project 2 A Week in the life of Doctor Kildare Handouts / Description now on Web site The Dr.s Office Due Dates: Minimum Effort Due: April 28, 2002 Full Project Due: May 12, 2002


slide-1
SLIDE 1

1

Project 2

The Dr.’s Office

First things first….

  • Project 2:

– A Week in the life of Doctor Kildare – Handouts / Description now on Web site – Due Dates:

  • Minimum Effort Due: April 28, 2002
  • Full Project Due: May 12, 2002

Please, please, please

  • Respect the submission dates

– ESPECIALLY FOR MIN-SUBMISSION!!!

  • Read over Project carefully!

– Ask questions early.

Doctor’s Office Manager

  • You are to program an office manager for a

doctor’s office.

– Your application will

  • Make/cancel appointments for the doctor
  • Print dr’s schedule indicating when the doctor is or

isn’t free.

  • Print bills for each patient seen during the week.

Doctor’s Office Manager

  • Rules:

– The doctor works M-F: 8am – 5pm – The doctor can perform a number of different procedures

  • Each procedure has:

– Required length – Cost for performing – Flag indicating whether it is covered by insurance Doctor is allowed to schedule lunch

– Doctor is allowed to schedule vacation – Doctor is allowed to schedule lunch

Doctor’s Office Manager

  • About Patients:

– Patients can be insured. – Types of insurance

  • HMO – Patient pays a co-pay
  • Private Insurance – Insurance pays for a percentage
  • f a procedure
  • Uninsured – Patient pays all costs of procedure

– Not all procedures are covered by insurance!!

slide-2
SLIDE 2

2

Doctor’s Office Manager

  • Running the application

– “top” class is the OfficeManager:

– java OfficeManager procedure-file appt-file

– Where

  • Procedure-file is a file listing all the procedures that the doctor

can perform

  • Appt-file is a file listing appointments to be kept by the doctor.

Doctor’s Office Manager

  • Procedure file

– First line indicates:

  • The HMO copay
  • The percentage covered by Private Insurance

– Next, for each procedure, the following info is provided:

  • Procedure name
  • Cost
  • Whether the procedure is covered by HMO
  • Whether the procedure is covered by private insurance

Doctor’s Office Manager

  • Appointment file

– Lists appointments to be made. 6 types:

  • SCHEDULE – Schedule an appointment for a patient
  • VACATION – Schedule vacation
  • LUNCH – Schedule lunch
  • CANCEL – Cancel an appointment
  • REPORT – Print the current appointment book
  • PRINTPROC – Print a listing of all procdures

– All appointments will be in 1 hour increments

Doctor’s Office Manager

  • Rules for scheduling

– Scheduling patients

  • SCHEDULE will list a day, a time, and the

procedure to be performed.

  • If the time requested is already booked:

– Try to book the procedure in the first available slot after the time requested – If there is no availability for the rest of the day, no appointment for this patient is scheduled

  • Print a message indicating if appointment was

scheduled or not

Doctor’s Office Manager

  • Rules for scheduling

– Scheduling vacation

  • VACATION gives a day and time
  • Vacation will be scheduled for all time slots at and after the

time requested.

  • If there are other appointments already scheduled, these

appointments will be canceled.

  • Print a message indicating that vacation has been schedule
  • No need to print messages about canceled appointments due to

vacation scheduling

Doctor’s Office Manager

  • Rules for scheduling

– Lunch scheduling

  • LUNCH will list a day, a time
  • If the time requested is already booked:

– Try to schedule lunch in the first available slot after the time requested – If there is no availability for the rest of the day, the doctor takes no lunch that day

  • Print a message indicating if lunch was scheduled or

not

slide-3
SLIDE 3

3

Doctor’s Office Manager

  • Rules for scheduling

– Cancellations

  • CANCEL will give a day and time
  • Remove the appointment (accounting for time to

perform the procedure)

  • Print a cancellation message.
  • Note: the test cases will guarantee that CANCEL

will always list a time when appointments are scheduled!

Doctor’s Office Manager

  • Billing patients:

– After all statements in the appointment file are read and scheduled,

  • A bill for each patient seen by doctor during the

week should be printed.

– Questions so far?

Classes to be implemented:

  • OfficeManager

– “top” class (contains the main) – Represents an office manager that reads and schedules appoitments

  • AppointmentBook

– Represents a single week of appointments. – The schedule for the doctor this week

  • Appointment

– Represents an individual appointment

Classes to be implemented

  • AppointmentException

– Subclass of Exception to indicate errors that

  • ccur when processing appointments
  • Patient

– Represents a patient

  • Procedure

– Represents a procedure to be performed by the doctor on a patient

Classes to be implemented

  • Insurance

– Represents a kind of insurance that a patient may have: – Abstract class with 3 subclasses:

  • HMOInsurance
  • PrivateInsurance
  • Uninsured

– Subclasses need only override 1 method from the Insurance Superclass.

Classes to be implemented

  • BinarySearchTree

– Procedures will be stored in a BinarySearchTree for efficient search – (More on BinarySearchTrees next week)

slide-4
SLIDE 4

4

Submissions

  • Like Project 1, there will be 5

submissions:

  • 1. (minimum) Insurance, Uninsured,

HMOInsurance, PrivateInsurance, Patient, Procedure

  • 2. BinarySearchTree
  • 3. Appointment
  • 4. AppointmentBook
  • 5. OfficeManager

Testing your code

  • Test cases will be provided in the project’s

jar file.

  • You’ll need to write your own test classes

(not to be submitted)

  • If you want to verify your results:

– A special try target has been set up – project2-test

Testing your code

  • try cs2-grd project2-test proc appt

– Will provide the correct results when the app is run on procedure file proc and appointment file appt

  • try cs2-grd project2-test proc appt java-files

– Will run the app on on procedure file proc and appointment file appt using the java class definitions that you pass in. – Example:

  • try cs2-grd project2-test proc.1 appt.1 Patient.java
  • Will run the app, using your definition of Patient

– Multiple java files are allowed when using project2- test.

Questions?

  • Once again

– Due Dates:

  • Minimum Effort Due: April 28, 2002
  • Full Project Due: May 12, 2002
  • NO LATE SUBMISSIONS!