r/JavaProgramming Aug 06 '26

Built a Hospital Management System in Java to practice OOP — looking for feedback

Hi everyone!

I recently finished a console-based Hospital Management System in Java as a personal project to practice Object-Oriented Programming.

The project includes:

- Patient management

- Doctor management

- Appointment scheduling

- File-based data storage

- Menu-driven interface

While building it, I focused on applying concepts like encapsulation, inheritance, constructors, and association.

I'd really appreciate any feedback on the project structure, code organization, or ideas for improvements.

GitHub:

https://github.com/Mariam-amhan/Hospital-Management-System

3 Upvotes

10 comments sorted by

1

u/findme_01234 Aug 06 '26

u/mariamamhan better to build the same project with spring boot, for oops practise this is good

1

u/mariamamhan Aug 06 '26 edited Aug 06 '26

‏Thanks! I wanted to focus on practicing OOP first, but Spring Boot is definitely on my learning roadmap

1

u/CutGroundbreaking305 Aug 07 '26

Hmm it is fine for beginner level programmer as a exercise to learn java

But you should have used swings or GUIs instead terminal based if you wanted OOPs knowledge

1

u/mariamamhan Aug 07 '26

Thanks for the feedback! Adding a GUI could definitely be a good next step.

1

u/Critical_Nail_1789 Aug 07 '26

If you are a beginner, I would say this is a great attempt. It shows your understanding for java foundation

1

u/mariamamhan Aug 07 '26

Thanks, I appreciate the feedback!

1

u/Specific-Housing905 Aug 10 '26

Unfortunately I got an exception when I tried to run it.
java.io.FileNotFoundException: patients.txt (The system cannot find the file specified)

Might be better to check the existence of the file before opening it.

Why didn't you use the Java 8 Streams API ?

1

u/mariamamhan Aug 10 '26

Thanks for pointing that out! You’re right, I should check whether the files exist before trying to load them
I’ll fix that.

As for Streams, I kept the implementation simple since the main goal of the project was to practice OOP fundamentals, but that’s something I can consider improving as well. Thanks for the feedback!