Implementation of a Hospital management system using ArrayList in Java

By | April 20, 2017

This code explains the implementation of a hospital management system using ArrayList. This application has a provision to insert, modify, delete and display patient records such as name, age, sex, address, illness, hospital charges. The records are stored in an ArrayList. Arraylist is a class in Java that implements List interface. ArrayList offers to store data in an array format and it is very flexible to sort, modify records.

This Hospital management application offers the following operations.

1. Register a patient with records such as name, age, sex, address, illness, hospital charges
2. Update patient details
3. Display patient details
4. Remove inactive patient. A patient is treated as inactive if he has been admitted to the hospital for more than 15 days.

 

hospital management system using ArrayList

 

Suggested Read:

The following video explains the execution of the Hospital management application:

 

Suggested articles for you:

12 thoughts on “Implementation of a Hospital management system using ArrayList in Java

  1. Raghav Shukla

    Sir,
    The code when copy-pasted dosen’t runs in any compiler or any online compilers.
    I have watched your video but got no clues about it.
    Please help , I am in pain.

    Thanks

    Reply
    1. Ravi Bandakkanavar Post author

      Hi Raghav,

      Thanks for mentioning. I did see two errors in the code. Modified following two lines.
      static ArrayList arl = new ArrayList();
      class Patient implements Comparable

      You can check it now.

      Reply
  2. amit yadav

    hello sir,
    the code shows 48 errors when run.
    please revert back

    Reply
      1. Anurag Verma

        Sir can you please send me the working code I need your help I have to submit it by tomorrow .. eroor is showing and I also see the video many times please just compile the code and give me the correct one …rest of your code is awesome but please resolve the eroor sir we need ur help at this time. Please give me correct working code I also give my email to you… Please….

        Reply
        1. Ravi Bandakkanavar Post author

          Hi Anurag,

          Thanks did go through the code after seeing your comment. I could see two errors in the code. Modified following two lines.
          static ArrayList arl = new ArrayList();
          class Patient implements Comparable

          You can check it now.

  3. Raman

    HospitalProcess hm = new HospitalProcess();
    this will show error message like cannot find symbol

    Reply

Did it help? Comment here..

This site uses Akismet to reduce spam. Learn how your comment data is processed.