Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

ajprincess

  • 2 years ago

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)

  • This Question is Closed
  1. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    |dw:1351105732670:dw|

  2. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    have you ever done Object Oriented programming?

  3. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

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

  4. ajprincess
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ya I have done in c++.

  5. experimentX
    • 2 years ago
    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.

  6. ajprincess
    • 2 years ago
    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?

  7. experimentX
    • 2 years ago
    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"); } } ------------------------

  8. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    probably this is your patient ID. give it long integer

  9. ajprincess
    • 2 years ago
    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 ?

  10. experimentX
    • 2 years ago
    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.

  11. ajprincess
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    what about the address?

  12. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    it's string.

  13. ajprincess
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    oh ok.

  14. ajprincess
    • 2 years ago
    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?

  15. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

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

  16. experimentX
    • 2 years ago
    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 } }

  17. experimentX
    • 2 years ago
    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.

  18. ajprincess
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    here this is the object name. Isnt t?

  19. experimentX
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

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

  20. ajprincess
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanxxxxxxxx a lotttt @experimentX

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

    Search OpenStudy
    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

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.