Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

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
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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

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

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

ya I have done in c++.
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.
Usually NIC be 1234565667v. what is the variable type do I give for this?
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"); } } ------------------------
probably this is your patient ID. give it long integer
but v comes at last it is char type right? wont it give me errors if I declare it long int ?
then give it string. perhaps you need validate ID using (REGEX) regular expression. this is quite irritating.
what about the address?
it's string.
oh ok.
The statement asking to input the name will be in the function set nt in get. Am I right @experimentX?
yes ... you are right. You need to store some data somewhere.
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 } }
you need to store your data somewhere. probably in some text file or database.
here this is the object name. Isnt t?
public class Patient{ <--- 'Patient' this is your class name.
Thanxxxxxxxx a lotttt @experimentX

Not the answer you are looking for?

Search for more explanations.

Ask your own question