Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

ajprincess Group Title

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)

  • one year ago
  • one year ago

  • This Question is Closed
  1. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    |dw:1351105732670:dw|

    • one year ago
  2. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    have you ever done Object Oriented programming?

    • one year ago
  3. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    http://en.wikipedia.org/wiki/Class_diagram

    • one year ago
  4. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    ya I have done in c++.

    • one year ago
  5. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

    • one year ago
  6. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Usually NIC be 1234565667v. what is the variable type do I give for this?

    • one year ago
  7. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

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

    • one year ago
  8. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    probably this is your patient ID. give it long integer

    • one year ago
  9. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    but v comes at last it is char type right? wont it give me errors if I declare it long int ?

    • one year ago
  10. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    then give it string. perhaps you need validate ID using (REGEX) regular expression. this is quite irritating.

    • one year ago
  11. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    what about the address?

    • one year ago
  12. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    it's string.

    • one year ago
  13. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    oh ok.

    • one year ago
  14. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    The statement asking to input the name will be in the function set nt in get. Am I right @experimentX?

    • one year ago
  15. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    yes ... you are right. You need to store some data somewhere.

    • one year ago
  16. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    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 } }

    • one year ago
  17. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    you need to store your data somewhere. probably in some text file or database.

    • one year ago
  18. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    here this is the object name. Isnt t?

    • one year ago
  19. experimentX Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    public class Patient{ <--- 'Patient' this is your class name.

    • one year ago
  20. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanxxxxxxxx a lotttt @experimentX

    • one year ago
  21. ajprincess Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.