ajprincess
  • ajprincess
Please Help:) Create a class called Patients which has members data NIC, Name, Address, BMI and its member functions. Write a full java program to display the patient's reports that would be included all the information.(Write a class diagram)
Computer Science
katieb
  • katieb
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

experimentX
  • experimentX
|dw:1351105732670:dw|
experimentX
  • experimentX
have you ever done Object Oriented programming?
experimentX
  • experimentX
http://en.wikipedia.org/wiki/Class_diagram

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

ajprincess
  • ajprincess
ya I have done in c++.
experimentX
  • experimentX
A class is just an object ... characteristic of object is attributes ... what can be done with object or what object does .... they are methods. characteristics are variables ... global variables within class while method are functions of class.
ajprincess
  • ajprincess
Usually NIC be 1234565667v. what is the variable type do I give for this?
experimentX
  • experimentX
http://www.tutorialspoint.com/java/java_object_classes.htm public class Dog{ String breed; //these variables are your attributes int age; String color; void barking(){ System.out.println("Wowow"); } void hungry(){ System.out.println("Wowowowowowow"); } void sleeping(){ System.out.println("Grrrr"); } } ------------------------
experimentX
  • experimentX
probably this is your patient ID. give it long integer
ajprincess
  • ajprincess
but v comes at last it is char type right? wont it give me errors if I declare it long int ?
experimentX
  • experimentX
then give it string. perhaps you need validate ID using (REGEX) regular expression. this is quite irritating.
ajprincess
  • ajprincess
what about the address?
experimentX
  • experimentX
it's string.
ajprincess
  • ajprincess
oh ok.
ajprincess
  • ajprincess
The statement asking to input the name will be in the function set nt in get. Am I right @experimentX?
experimentX
  • experimentX
yes ... you are right. You need to store some data somewhere.
experimentX
  • experimentX
you need something like this public class Patient{ String patientID; String patientName; String patientAddress; Date patientDOB; Report patientReport; // The attributes also can contain other objects public void setPatient(String ID){ this.patientID = ID // query database with this ID and set the patients attributes // seems you are doing small project, you can store info on some .bin file return self; } public void findPatientByName(String name){ // query DB or file with the given name and set attributes } public void generatePatientReport(){ //query databse and generate report } }
experimentX
  • experimentX
you need to store your data somewhere. probably in some text file or database.
ajprincess
  • ajprincess
here this is the object name. Isnt t?
experimentX
  • experimentX
public class Patient{ <--- 'Patient' this is your class name.
ajprincess
  • ajprincess
Thanxxxxxxxx a lotttt @experimentX

Looking for something else?

Not the answer you are looking for? Search for more explanations.