This README provides an overview of the Hospital System project, including a description of the project, details about its structure, usage instructions, commands, contributors, licensing information, and acknowledgments.
The Hospital System project is a Java program that simulates a hospital management system. It provides a user interface for adding patients and doctors to the hospital, establishing connections between them, and displaying the current state of the hospital. The project's main goal is to manage patients and doctors in a hospital environment efficiently.
The project consists of the following Java classes and interfaces:
-
App
: TheApp
class serves as the main program entry point. It allows users to interact with the hospital system by entering commands through the console. Users can add patients and doctors, establish connections between them, and view the current state of the hospital. -
Doctor
: TheDoctor
class represents a doctor in the hospital. It includes properties such as ID, specialty, and a collection of patients. -
Hospital
: TheHospital
class represents the hospital itself and contains methods to add and remove doctors and patients, as well as to establish connections between them. -
IDoctor
: TheIDoctor
interface defines the contract for a doctor in the hospital. It includes methods to get the doctor's ID, add and remove patients, get the list of patients, and retrieve the specialty. -
IPacient
: TheIPacient
interface defines the contract for a patient in the hospital. It includes methods to get the patient's ID, add and remove doctors, get the list of doctors, and retrieve the diagnosis. -
Pacient
: ThePacient
class represents a patient in the hospital. It includes properties such as ID, diagnosis, and a collection of doctors.
To use this project, follow the steps below:
-
Setup Instructions:
- Ensure you have Java installed on your system to run this program.
-
Installation:
- No specific installation is required. You can compile and run the program using a Java compiler or an integrated development environment (IDE) like Eclipse or IntelliJ IDEA.
-
How to Run:
- Run the
App
class, which serves as the entry point for the program. It will provide a console interface for entering commands.
- Run the
-
Review Output:
- The program will display the results of the commands you enter, including the current state of the hospital or error messages for invalid commands.
-
addMeds [doctor1Name-specialty] [doctor2Name-specialty] ...
: Adds doctors to the hospital. Each doctor is specified with their name and specialty. -
addPacs [patient1Name-diagnosis] [patient2Name-diagnosis] ...
: Adds patients to the hospital. Each patient is specified with their name and diagnosis. -
tie [doctorName] [patientName]
: Establishes a connection between a doctor and a patient. -
show
: Displays the current state of the hospital, including doctors, patients, and their connections. -
end
: Exits the program.
This project is licensed under the MIT License. You can find detailed licensing information in the LICENSE.md
file included in the project directory.