CS506 Assignment 2 Spring 2021 – Assignments – Solution VU
In pandemic of COVID-19, GOP (Government Of Pakistan) has decided to vaccinate their citizens to control the spread of virus as well as to control the death rate due to the virus. As a java developer, you are required to develop an application which will keep the records of the vaccinated patients. That application will be used to keep the records as well as to check the specific vaccinated patient.
- Patient ID
- Patient Name
- Patient Address
- Covid-19 Effected (Y/N)
You have to create a database in MS Access and add a table in the database. The name of database should be same as your own VU ID (like BCxxxxxxxxx) and the name of table should be Patient. Patient table will have four attributes i.e. ID, Patient Name, Address and Covid-19 Effected (Y/N). After completing your code, execute your java file(s) on command prompt and take the screenshot of the output/result.
Checking of record for specific patient:
Now, design a graphical user interface in java as given below (You must have to mention your own VU ID in title as shown in screenshot).
Your program should perform following tasks:
- Add new record in database
Whenever a user input some new data in text fields and clicks “Add Patient Record” button, all the text fields’ data should be stored in Patient Table.
- Search a record from database
Whenever a user enters any Patient ID in text field and clicks “Search Patient Record” button, your program should fetch this record from database. If this ID is available in database, then display the record of this ID in the mentioned text fields otherwise show an error message that no such record is available.
Important Regarding Development:
- 1. Create a sub-folder named “data” in your project root folder and place your database file inside the data folder.
- If you are using JDK1.8 or above, then you will have to use ucanaccess driver to connect to MS Access database. In this case, I will suggest you view the following tutorial.
Following links will be helpful in creating new database in MS Access.
Important Regarding Submission:
After completing your code, compile and run java file(s) using command prompt and take the screenshot of the output/result. Now, compress your code, database file and screenshot of the output using winzip or winrar and upload it on VULMS.
#CS506 #Assignment #Spring #Assignments #Query