COMP 139 - Final Project

Learning Outcomes and Introduction

In this final project, you will be pulling together all of the concepts from this course to create a model of a health-care facility. In particular, you will need to use your knowledge of:

You will need to create a few classes of your own, but you may also use any of the classes in the Java Standard Library and the LabTests.jar to support your program.

Task Description

Create a model of a health-care facility. Your program will accept lists of patients and their illnesses, provide them with treatment if possible, and output reports of the work that was done.

Your program should have a main loop to handle each "day" of work at your facility. Each iteration of the loop will read in a group of patients that arrive on that day and assign them beds, nurses, and doctors as they become available. Your main loop should continue to run until instructed to stop by the user, or until an upper limit of "days of work" is reached (at least three days).

The specifics of the implementation and exact output are up to you, but your program must satisfy the following minimum requirements:

  1. Patients

    • have a first and last name
    • are assigned an ID number by the facility, based on the order they arrive
    • have a health problem that may or may not be treatable by your care facility
    • have an "amount owing" to the health-care facility for their treatment
    • must be assigned beds and treated on a first-come, first-served basis
  2. Beds

    Your facility has a limited (fixed) number of beds. Each bed:

    • has a unique name or number to identify it
    • can only be assigned to one patient at a time
    • may be moved and used by any unit in the facility
    • has a dollar cost for use, which may vary from bed to bed
  3. Staff

    • your facility has a limited (fixed) roster of nurses and doctors on staff
    • staff members belong to "units" within the facility
    • each unit has at least one nurse
    • nurses may care for any number of patients within their unit
    • doctors may only treat one patient at a time
    • doctors have a speciality that determines which illnesses they are able to treat
    • all employees have an annual salary that does not depend on the number or type of patients they care for
  4. Treatment

    Before treatment, a patient must be:

    • assigned to a bed
    • assigned a nurse
    • assigned a doctor specializing in their illness

    To complete their treatment, the patient must be cared for by their doctor for a minimum of 2 "days" (2 iterations of the main program loop, including the day they arrive). Once they have been treated, they are dischared from the facility and their bed may be used by other patients.

    Accepting and treating patients generates income for the facility. Specifically:

    • patients owe a small amount when they claim a bed, based on the cost of the bed
    • patients owe a larger amount once they have been treated and discharged
  5. Reporting

    After your program has stopped accepting patients, it must report:

    • The list of patients that were treated, ordered by their "amount owing" to the facility.
    • The list of beds that are available for new patients.
    • The total amount owed by patients to the facility.
    • The total amount the facility owes its employees.

Your solution should show your mastery of lists (used as stacks and queues), searching, and sorting.

bonus Add features beyond the minimum requirements and make the program your own and earn bonus points! What other interesting reports could you add? What should your program do if your facility runs out of beds?

Submission

Your completed project should include a single main method class and as many supporting classes as necessary, stored within a single package named like LastnameFirstname_project. Compress the package directory into a ZIP archive and upload it to the D2L assignment.

The marks for this project are heavily weighted towards good coding practice and style. Your code for handling input, processing data, and showing output must be clearly separated from one another. Pay attention to your code formatting, make sure you have documented all public members using JavaDoc, and make sure you are using data structures and methods.

NOTE: This assignment is to be done individually. You can help one another with problems and questions, but in the end everyone must do their own work.

CriteriaMarks
Programs compile and run without error 2
Good coding style 2
Task requirements met or exceeded 2
Total 6