Hay Friends...
Here I started a new and interested thread. I hope you also enjoy it. I got a task to creat a Hospital Database in Java. But I don´t have any good clues abouts it. So I also try my best to do it well. But here I posted it for friends too. If you have any perfect idea or correct code about it, so Please send it. I shall wait for your nice comments and help.
Here I also explain about my task..........Hospital Database
Hay friends....I don´t have any good idea about interesting pictures here because I also want to interest some dialogue box pictures.
Objects of Programming
Course Project
Scenario
You are working for a bio-informatics company called unCode GeneTicks. Your project manager has a small hospital database storing information about patients and how severe they are experiencing skin and circulation problems on the arms, legs and head on a scale of 0..3(See addendum Patients.txt) This database also has information about candidate genes responsible for the illnesses. Patients are labelled as having one of gene 1, 2 or 3 (g1, g2, g3) in the hospital database. As your first task for unCode GeneTicks you have been asked to write an analyser program to analyse the data, and to write a report on your findings.
Program Requirements
Program should:
• Produce histogram plots showing patient counts in six divisions, each gene group being separately considered for skin and circulation problem. See the example dialogue in the addenda.
• Allow the user the choice of threshold level (>=0, >=1, >=2, >=3) from a combo box when counting patients e.g. count is registered if the threshold value is equalled or higher for every skin measure (or every circulation measure)
• Define a Patient class in which all data are kept private and readable only through ‘get’ methods. This class must:
o Implement the provided HospitalPatient interface
o Define a toString() method
o Define an equals() method
• Define a Patients class which has a LinkedList of Patients along with necessary methods to create that list and retrieve relevant information from it.
• Define a PatientPanel class which inherits from the JPanel class, and contains the paintComponent method for drawing the histograms.
o Frames with this panel should be able to be closed by the end user without quitting the application.
• Define a ControlPanel class which inherits from the JPanel class. This is the main graphical user interface of the program. It should include the following components:
o A label for instructions to the end user
o A combo box for selecting the threshold level
o A pair of radio buttons for selecting whether head data is to be included
o A button to create a new window with the chosen histogram
• Defina a PatientAnaliser class which is the start point of the program. This class should:
o Create an object of Patients
o Have that object open and read the text file Patients.txt
o If that was successful it should display the main GUI of the program
o If the file was not found it should show a dialog box stating this information
o If there was any problems with reading the file it should show a dialog box stating this information.
Addenda
HospitalPatient.java
public interface HospitalPatient
{
public String getGeneID();
public int getArmsSkin();
public int getArmsCirc();
public int getLegsSkin();
public int getLegsCirc();
public int getHeadSkin();
public int getHeadCirc();
}
Patients.txt
<geneID><arms skin><arms circ><legs skin><legs circ><head skin><head circ>
g1 1 0 1 0 0 0
g1 0 1 0 1 0 1
g1 0 1 0 0 1 1
g1 0 0 0 1 1 1
g1 0 0 1 1 1 1
g1 0 1 1 1 1 1
g1 1 0 1 1 1 1
g1 1 1 1 0 0 0
g1 1 1 0 1 0 0
g1 1 1 1 0 0 0
g1 1 1 1 1 0 0
g1 0 1 1 1 1 0
g1 1 0 1 0 1 0
g1 0 1 0 1 0 1
g2 1 2 1 2 1 1
g2 1 2 1 2 1 2
g2 1 1 1 1 2 2
g2 1 1 1 2 2 2
g2 1 1 2 2 2 2
g2 1 2 2 2 2 2
g2 2 2 2 2 2 2
g2 2 1 1 1 1 1
g2 2 2 1 1 1 1
g2 2 2 2 1 1 1
g2 2 2 2 2 2 1
g2 2 2 2 1 2 2
g2 1 2 1 2 1 2
g2 2 1 2 1 2 1
g3 2 3 3 3 1 1
g3 2 2 2 2 2 3
g3 2 3 2 3 2 2
g3 2 3 2 3 3 2
g3 2 2 2 3 3 3
g3 3 3 2 3 3 2
g3 2 3 3 3 3 3
g3 3 3 2 3 2 2
g3 3 3 2 3 2 2
g3 3 3 2 3 2 2
g3 3 3 2 3 2 2
g3 2 3 3 3 3 2
g3 2 3 3 3 3 2
g3 2 3 3 3 3 2