Navigation

    Cyberian
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Pro Blog
    • Users
    • Groups
    • Unsolved
    • Solved

    CS506 Assignment No. 02
 Solution and Discussion

    CS506 - Web Design and Development
    2
    4
    276
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • zaasmi
      zaasmi Cyberian's Gold last edited by

      9cdcb8e3-e668-40c4-8fa1-8ee2b9b6eccd-image.png

      Assignment No. 02
Semester: Spring 2019
      CS506 – Web Design and Development

      Total Marks: 20

      Due Date: 31/05/2019

      Uploading instructions:

      • 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.
      • 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.
      • It is not NetBeans IDE project (any other format will not be accepted in any case).
      • 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 [email protected]

      Assignment

      Problem Statement:

      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.

      Detailed Description:

      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);

      Fig. 1: Doctors Table in Database

      Fig. 2: Patients Table in Database

      Appointment class should have the following data members and member functions;

      ¥ no: int
      ¥ patient: String
      ¥ doctor: String
      ¥ disease: String
      ¥ scheduledDay: String
      ¥ Constructors: default, parameterized and copy constructor
      ¥ Standard Setters: setNo(…), setPatient(…), setDoctor(…),
      setDisease(…), setScheduledDay (…)
      ¥ Standard Getters: getNo(), getPatient(), getDoctor(),
      getDisease(), getScheduledDay()
      MainClass must contain the main() method which should initialize all GUI components and display following two buttons;

      1. Appointments

      2. Search

      3. Appointments:

      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).

      *Sample SQL query:

      SELECT … FROM Patients, Doctors
      WHERE Patients.Disease = Doctors.Specialization

      Fig. 3: Appointments Detail on GUI

      1. Search:

      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”.

      *Sample SQL query:

      SELECT … FROM Patients, Doctors
      WHERE Patients.Disease = Doctors.Specialization
      AND Patients.Cnic = ‘proivdedCnic’

      Fig. 4: Search Result

      Note:
      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.

      92d3585a-2e65-45ef-b3f5-f5db011e3629-image.png

      Table. 2: Sample Data for Patients Table in Database

      Important Regarding Development:

      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.

      https://vulms.vu.edu.pk/Courses/CS506/Downloads/UCanAccess.mp4

      Following links will be helpful in creating new database in MS Access.

      https://support.office.com/en-us/article/Create-a-new-database-32a1ea1c-a155-43d6-aa00-f08cd1a8f01e
      http://www.dummies.com/software/microsoft-office/access/how-to-build-a-new-database-in-access-2016/
      https://www.wikihow.com/Make-a-Database-Using-MS-Access

      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 fetched from database in the form of Java class object/s.
      ¬ For GUI, relevant components (i.e. JFrame, JPanel, JScrollPane, JTable, JButton, and JLable etc.) from AWT and Swing packages should be used.
      ¬ For fetching data from database, you need to use proper SQL queries.
      ¬ Need to make sure that exceptions are managed properly throughout the program.

      GOOD LUCK

      Deadline: Your assignment must be uploaded/submitted on or before 3rd June 2019.

      Discussion is right way to get Solution of the every assignment, Quiz and GDB.
      We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
      Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
      NOTE: Don't copy or replicating idea solutions.
      Quiz Copy Solution
      Mid and Final Past Papers
      Live Chat

      1 Reply Last reply Reply Quote 0
      • M
        moaaz Cyberian's Gold last edited by

        Cs506-2nd-Assignment(rlOYu9).zip
        Attached file Solution idea

        Discussion is right way to get Solution of the every assignment, Quiz and GDB.
        We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
        Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
        NOTE: Don't copy or replicating idea solutions.

        How to Get Earning from Cyberian

        Quiz Copy Solution
        Mid and Final Past Papers
        Live Chat

        For instructions on how to use this Cyberian discussion board

        1 Reply Last reply Reply Quote 0
        • zaasmi
          zaasmi Cyberian's Gold last edited by

          Discussion is right way to get Solution of the every assignment, Quiz and GDB.
          We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
          Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
          NOTE: Don't copy or replicating idea solutions.
          Quiz Copy Solution
          Mid and Final Past Papers
          Live Chat

          1 Reply Last reply Reply Quote 0
          • zaasmi
            zaasmi Cyberian's Gold last edited by

            Discussion is right way to get Solution of the every assignment, Quiz and GDB.
            We are always here to discuss and Guideline, Please Don't visit Cyberian only for Solution.
            Cyberian Team always happy to facilitate to provide the idea solution. Please don't hesitate to contact us!
            NOTE: Don't copy or replicating idea solutions.
            Quiz Copy Solution
            Mid and Final Past Papers
            Live Chat

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            banner
            Insaf Sehat Card Live Cricket Streaming

            100% Off on Your FEE Join US! Ask Me How?

            Quiz 100% Result If you want to know how you can join us and get 100% Discount on your FEE ask Cyberian in Chat Room!
            Quiz 100% Result Quiz 100% Result
            solution1255 discussion1206 fall 2019813 assignment 1433 assignment 2297 spring 2020265 gdb 1248 assignment 382 crw10174 spring 201955
            | |
            Copyright © 2021 Cyberian Inc. Pakistan | Contributors
            Live Chat