Results 1 to 12 of 12
  1. #1
    AccountSaver is offline Member
    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    Question Can someone solve this ;

    Hello i have a request can someone solve this;

    The exercise is this:

    I want one structure named "Patient" to keep the record about patients in
    a hospital , which means the "surname" the registration number "number"
    the "disease" and the "Age" and the hospitalization "days".
    The variables should be private


    appropriate structure for the creation of objects of class that initializes all variables class

    methods to allow recovery and change the properties of the class.

    method that displays illustrative detail and all the characteristics of each patient

    a method that returns the cost of hospitalization (double cost ()) based on the formula =
    Price = 1000 + days of hospitalization * 30

    Then construct a class TestPatient which must:
    to specify 10 objects of class Patient using the builder you created

    print for each patient all the information and the cost of hospitalization.

    to find a patient who has the biggest cost of hospitalization and who less

    in one dimensional array of appropriate size to enter the cost of hospitalization of all patients

    Emphasized that all the results should be given with the appropriate explanations and that the presence of feedback in the program is mandatory

  2. #2
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Can someone solve this ;

    What have you tried so far? We can't help you unless you have done something yourself.

  3. #3
    AccountSaver is offline Member
    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    Default Re: Can someone solve this ;

    Quote Originally Posted by pj6444 View Post
    What have you tried so far? We can't help you unless you have done something yourself.
    It's not for me.It's for a friend of mine,he is studying logistics and they have 1 lesson only for 1 semester and its called JAVA,but he doesn't have a clue on JAVA,and he can't pass the lesson and the tests so he want to solve this problem as the teacher said to him and write the theory of the test and he will pass the lesson.

    But i can't help me otherwise.

  4. #4
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Can someone solve this ;

    Well we won't just give him code, because that would be cheating.

  5. #5
    AccountSaver is offline Member
    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    Default Re: Can someone solve this ;

    Quote Originally Posted by pj6444 View Post
    Well we won't just give him code, because that would be cheating.
    Yeah it will be cheating.
    But he don't have any other solution.Until i tried also to learn fast JAVA to write it for him but i couldn't he have to give the solution of the problem until Monday.

  6. #6
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Can someone solve this ;

    He has to do it himself.

  7. #7
    AccountSaver is offline Member
    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    Default Re: Can someone solve this ;

    Can't you just give me the answer ; He doesn't have the time to do that.I don't have also the time to learn and teach him JAVA.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,733
    Blog Entries
    7
    Rep Power
    21

    Default Re: Can someone solve this ;

    Because the cost is a function that is monotonically increasing w.r.t. the number of days, all one has to do is find the maximum number of days if one wants to find the patient with a maximum cost value; all the rest are frillies such as loops and small classes and getters and setters and an occasional System.out.println( ... ) here and there ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    AccountSaver is offline Member
    Join Date
    Jan 2014
    Posts
    5
    Rep Power
    0

    Default Re: Can someone solve this ;

    I don't know ,not even a little about JAVA, i wanted to ask you,here in the forum due to that someone would have the knowledge to solve this fast and be cleared.
    If i don't know and don't have the slightest clue,then he doesn't know anything. He know only how to login in the facebook.

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,733
    Blog Entries
    7
    Rep Power
    21

    Default Re: Can someone solve this ;

    Quote Originally Posted by AccountSaver View Post
    I don't know ,not even a little about JAVA, i wanted to ask you,here in the forum due to that someone would have the knowledge to solve this fast and be cleared.
    If i don't know and don't have the slightest clue,then he doesn't know anything. He know only how to login in the facebook.
    You're out of luck then; I know nothing about rocket science; guess what would happen if I'd call/email NASA and asked them to build me one ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    superhaNds is offline Senior Member
    Join Date
    Apr 2013
    Location
    Sweden
    Posts
    268
    Rep Power
    2

    Default Re: Can someone solve this ;

    Quote Originally Posted by JosAH View Post
    You're out of luck then; I know nothing about rocket science; guess what would happen if I'd call/email NASA and asked them to build me one ...

    kind regards,

    Jos

    touché.

  12. #12
    Heanre is offline Member
    Join Date
    Jan 2014
    Posts
    2
    Rep Power
    0

    Default Re: Can someone solve this ;

    i'm sorry but i'm not that good in english(it's not my first language) ... can you please rephrase the java program you need?

Similar Threads

  1. Do not know how to solve this
    By jaylimix in forum New To Java
    Replies: 13
    Last Post: 05-31-2011, 12:42 PM
  2. Please help me to solve it(jsp)
    By srengvichet in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-15-2010, 04:52 PM
  3. Please help me solve them
    By quangtrung89 in forum New To Java
    Replies: 2
    Last Post: 11-26-2009, 11:08 PM
  4. Plz solve this....
    By theone3nu in forum Java 2D
    Replies: 3
    Last Post: 01-08-2009, 06:01 PM
  5. Plz solve this....
    By theone3nu in forum New To Java
    Replies: 9
    Last Post: 12-23-2008, 10:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •