We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

CS506 Web Design and Development Assignment No.1 Solution & Discussion Due date: 16 may 2019

    CS506 Assignment No.1

Web Design And Development:

Uploading instructions:


  • Your assignment should be in .zip /.rar format. Other file formats will not be accepted.
  • Save your assignment with your ID (e.g. bc000000000.zip).
  • No assignment will be accepted through email.


Rules for Marking:


It should be clear that your assignment will not get any credit if:


·         The assignment is submitted after due date.

·         The submitted assignment does not open, execute or file is corrupted.

·         Your assignment is copied from internet, handouts or from any other student

      (Strict disciplinary action will be taken in this case).

·            Do not put any query on MDB about this assignment, if you have any query then email at cs506@vu.edu.pk





Problem Statement:                                                        


You are required to write a Java program, named Patients History, for a typical hospital management system. In which user will be asked to provide patients details as input, which will be saved in a simple text file. Further, user can search a particular patient and as well as can view all patients’ history via GUI.


Detailed Description:


For this purpose, you have to create a text file (i.e. data.txt) and three java classes (i.e. Person, Patient and MainClass). Data members and member functions of these classes are given below;


Note: There should be three different Java files which contain theses classes.


Person class must have the following data members & member functions:

•                     cnic: long

•                     name: String

•                     age: int

•                     Constructors: default, parameterized and copy constructor

•                     Standard Setters: setCnic(…), setName(…), setAge(…)

•                     Standard Getters getCnic(), getName(), getAge()

Patient class will inherit from Person class and should have the following data members & member functions:

•                     disease: String

•                     appointmentDate: String

•                     Constructors: default, parameterized and copy constructor

•                     Standard Setters: setDisease(…), setAppointmentDate(…)

•                     Standard Getters getDisease(), getAppointmentDate()


          Fig. 1: Classes Hierarchy


MainClass should contain the main() method. At first, it should load data from text file (i.e. data.txt) and save in ArrayList. After that, the interface should display following options;


1.      Add a new Patient  

2.      Search a Patient

3.      View all Patients

4.      Exit

          Fig. 2: First GUI


1. Add a new Patient:


Each time, user selects this option, s/he will be prompted to enter new patient information (i.e. cnic, name, age, disease and appointment date). If inputs are correct (i.e. found no empty value) then new patient information will be added in ArrayList, otherwise a message should be displayed "Invalid input".

          Fig. 3: User Inputs



2. Search a Patient:


In order to search a patient, user will be asked to provide a CNIC. The program will search corresponding patient in ArrayList. If patient is found, history will be displayed to user. Otherwise, a message should be displayed "Patient not found".

Fig. 4: Search a Patient

3. View all Patients:


The program should first check if ArrayList contains any data; if not, it means no patient is added yet so ask user to add a new patient first. Otherwise, a GUI will be opened, displaying all patients’ history.

Fig. 5: Patients’ History

4. Exit:


            Exit option will terminate the program by saving all ArrayList data back to text file (i.e. data.txt) and showing the developer information (i.e. Student Id and name) via GUI.


Fig. 6: Developer Info.

Fig. 7: Sample data file (i.e. data.txt)


Important Things to Implement:


Ø  Java Classes must have proper Data Members and Member Functions along with Constructor/s, Setters and Getters etc.

Ø  Data will be stored to / fetched from ArrayList in the form of Java class object/s.

Ø  For GUI, relevant Java Swing Dialogs (by using JOptionPane) should be used for taking input and displaying any information to user throughout the program.

Ø  Need to make sure that exceptions are managed properly throughout the program.


What and How to Submit:


Ø  It must be complete NetBeans IDE project folder (which should contain complete source code, text files, and builds etc.). After finalizing, compress it with Zip or RAR format and submit it at VU-LMS within due date.






Deadline: Your assignment must be uploaded/submitted on or before 16th May 2019.



+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..

See Your Saved Posts Timeline

Views: 5149


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)


Replies to This Discussion

omarsstcs@gmail.com py ap mujay email kar dain




kindly mujhy b koe email kr dy 

imran1163@gmail.com pe 

i am waiting

1 hour left kindlyyyy koe share kr do plsss


ye kia?

do u have solution yasir?


Latest Activity

Shine--Ex-VUStudent liked +++Amara+++++'s discussion Subha -Shaam ki
5 minutes ago
Javeria Nazir updated their profile
35 minutes ago
+++Amara+++++ liked Sharal Khan's blog post ALLAH.........
2 hours ago
+ M.Tariq Malik liked 2.O's discussion Pakistani Currency :P :P
2 hours ago
+ M.Tariq Malik liked 2.O's discussion Cocomo mujhe bhi doo :P :P
2 hours ago
+ M.Tariq Malik liked + ⭐️ Singer ⭐️'s discussion Choose 3 Ning friends to finish this.
2 hours ago
Sharal Khan posted blog posts
2 hours ago
Mano Bilii updated their profile
2 hours ago

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service