<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS506 Assignment No. 02  Solution and Discussion]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1560005877276-9cdcb8e3-e668-40c4-8fa1-8ee2b9b6eccd-image.png" alt="9cdcb8e3-e668-40c4-8fa1-8ee2b9b6eccd-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Assignment No. 02 Semester: Spring 2019<br />
CS506 – Web Design and Development</p>
<p dir="auto">Total Marks: 20</p>
<p dir="auto">Due Date: 31/05/2019</p>
<p dir="auto">Uploading instructions:</p>
<p dir="auto">•	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.<br />
•	Your assignment should be in .zip /.rar format. Other file formats will not be accepted.<br />
•	Save your assignment with your ID (e.g. bc000000000.zip).<br />
•	No assignment will be accepted through email.</p>
<p dir="auto">Rules for Marking:</p>
<p dir="auto">It should be clear that your assignment will not get any credit if:</p>
<p dir="auto">•	The assignment is submitted after due date.<br />
•	The submitted assignment does not open, execute or file is corrupted.<br />
•	It is not NetBeans IDE project (any other format will not be accepted in any case).<br />
•	Your assignment is copied from internet, handouts or from any other student (strict disciplinary action will be taken in this case).<br />
•	Do not put any query on MDB about this assignment, if you have any query then email at <a href="mailto:cs506@vu.edu.pk" target="_blank" rel="noopener noreferrer nofollow ugc">cs506@vu.edu.pk</a></p>
<p dir="auto">Assignment</p>
<p dir="auto">Problem Statement:</p>
<p dir="auto">You are required to develop a Java program, named Hospital Management System for a typical medical treatment center; in which you will fetch doctors and patients detail from database and schedule appointments. Further, user can search an appointment for a particular patient as well; all data will be shown to user via GUI.</p>
<p dir="auto">Detailed Description:</p>
<p dir="auto">For this purpose, you have to create one MS Access Database file (the name of file must be same as your own VU ID i.e. BS00000000.accdb) and two Java classes (i.e. Appointment and MainClass). Database file should contain two tables (i.e. Doctors and Patients);</p>
<p dir="auto">Fig. 1: Doctors Table in Database</p>
<p dir="auto">Fig. 2: Patients Table in Database</p>
<p dir="auto">Appointment class should have the following data members and member functions;</p>
<p dir="auto">¥	no: int<br />
¥	patient: String<br />
¥	doctor: String<br />
¥	disease: String<br />
¥	scheduledDay: String<br />
¥	Constructors: default, parameterized and copy constructor<br />
¥	Standard Setters: setNo(…), setPatient(…), setDoctor(…),<br />
setDisease(…), setScheduledDay (…)<br />
¥	Standard Getters: getNo(), getPatient(), getDoctor(),<br />
getDisease(), getScheduledDay()<br />
MainClass must contain the main() method which should initialize all GUI components and display following two buttons;</p>
<ol>
<li>
<p dir="auto">Appointments</p>
</li>
<li>
<p dir="auto">Search</p>
</li>
<li>
<p dir="auto">Appointments:</p>
</li>
</ol>
<p dir="auto">The program will schedule the appointments by matching patient’s diseases with doctor’s specializations by using SQL selection query* and will display the result on GUI; needed to use Swing table component (i.e. javax.swing.JTable).</p>
<p dir="auto">*Sample SQL query:</p>
<p dir="auto">SELECT … FROM Patients, Doctors<br />
WHERE Patients.Disease = Doctors.Specialization</p>
<p dir="auto">Fig. 3: Appointments Detail on GUI</p>
<ol start="2">
<li>Search:</li>
</ol>
<p dir="auto">And, when user clicks on “Search” button then ask user to enter CNIC of a patient (using JOptionPane.showInputDialog). If input is correct (i.e. found no empty/null value) and corresponding patient is found in database then schedule an appointment by matching his/her disease with doctor’s specialization, otherwise a message should be displayed “Found no Patient”.</p>
<p dir="auto">*Sample SQL query:</p>
<p dir="auto">SELECT … FROM Patients, Doctors<br />
WHERE Patients.Disease = Doctors.Specialization<br />
AND Patients.Cnic = ‘proivdedCnic’</p>
<p dir="auto">Fig. 4: Search Result</p>
<p dir="auto">Note:<br />
The above given images are just for reference purpose only; you will be making your own GUIs. It is not required to be exactly the same.</p>
<p dir="auto"><img src="/assets/uploads/files/1560005915344-92d3585a-2e65-45ef-b3f5-f5db011e3629-image.png" alt="92d3585a-2e65-45ef-b3f5-f5db011e3629-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Table. 2: Sample Data for Patients Table in Database</p>
<p dir="auto">Important Regarding Development:</p>
<p dir="auto">If you are using JDK1.8 or above then you’ll have to use ucanaccess driver to connect to MS Access database. In this case, I’ll suggest you to view the following tutorial.</p>
<p dir="auto"><a href="https://vulms.vu.edu.pk/Courses/CS506/Downloads/UCanAccess.mp4" target="_blank" rel="noopener noreferrer nofollow ugc">https://vulms.vu.edu.pk/Courses/CS506/Downloads/UCanAccess.mp4</a></p>
<p dir="auto">Following links will be helpful in creating new database in MS Access.</p>
<p dir="auto"><a href="https://support.office.com/en-us/article/Create-a-new-database-32a1ea1c-a155-43d6-aa00-f08cd1a8f01e" target="_blank" rel="noopener noreferrer nofollow ugc">https://support.office.com/en-us/article/Create-a-new-database-32a1ea1c-a155-43d6-aa00-f08cd1a8f01e</a><br />
<a href="http://www.dummies.com/software/microsoft-office/access/how-to-build-a-new-database-in-access-2016/" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.dummies.com/software/microsoft-office/access/how-to-build-a-new-database-in-access-2016/</a><br />
<a href="https://www.wikihow.com/Make-a-Database-Using-MS-Access" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.wikihow.com/Make-a-Database-Using-MS-Access</a></p>
<p dir="auto">Important Things to Implement:<br />
¬	Java Classes must have proper Data Members and Member Functions along with Constructor/s, Setters and Getters etc.<br />
¬	Data will be fetched from database in the form of Java class object/s.<br />
¬	For GUI, relevant components (i.e. JFrame, JPanel, JScrollPane, JTable, JButton, and JLable etc.) from AWT and Swing packages should be used.<br />
¬	For fetching data from database, you need to use proper SQL queries.<br />
¬	Need to make sure that exceptions are managed properly throughout the program.</p>
<p dir="auto">GOOD LUCK</p>
<p dir="auto">Deadline: Your assignment must be uploaded/submitted on or before 3rd June 2019.</p>
]]></description><link>https://community.secnto.com//topic/86/cs506-assignment-no-02-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 21:48:01 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/86.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Jun 2019 14:59:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS506 Assignment No. 02  Solution and Discussion on Sat, 08 Jun 2019 15:03:56 GMT]]></title><description><![CDATA[<p dir="auto"><a href="/assets/uploads/files/1560006230251-cs506-2nd-assignment-rloyu9.zip">Cs506-2nd-Assignment(rlOYu9).zip</a><br />
Attached file Solution idea</p>
]]></description><link>https://community.secnto.com//post/167</link><guid isPermaLink="true">https://community.secnto.com//post/167</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Sat, 08 Jun 2019 15:03:56 GMT</pubDate></item><item><title><![CDATA[Reply to CS506 Assignment No. 02  Solution and Discussion on Sat, 08 Jun 2019 15:01:15 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/Sz7PF-99fN4" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/Sz7PF-99fN4</a></p>
]]></description><link>https://community.secnto.com//post/166</link><guid isPermaLink="true">https://community.secnto.com//post/166</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Sat, 08 Jun 2019 15:01:15 GMT</pubDate></item><item><title><![CDATA[Reply to CS506 Assignment No. 02  Solution and Discussion on Sat, 08 Jun 2019 15:00:52 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://youtu.be/htvA1VVZIKc" target="_blank" rel="noopener noreferrer nofollow ugc">https://youtu.be/htvA1VVZIKc</a></p>
]]></description><link>https://community.secnto.com//post/165</link><guid isPermaLink="true">https://community.secnto.com//post/165</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Sat, 08 Jun 2019 15:00:52 GMT</pubDate></item></channel></rss>