Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Java code for a Question

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java code for a Question

    Can sombody help me in solving this question, and write a code, and plz reply me as soon as possible

    Q)A doctor is good only if the doctor satisfies the following conditions:

    He is a �Cardiologist� (but see next conditon)
    If he is not a "Cardiologist", he must be working with �Apollo Hospital� and have his own nursing home.
    if he has a nursing home, he should charge between Rs. 300 to 500 as consultancy charges, and Rs. 450 otherwise.
    If he is working with "Kailash Hospital", he should not work at "Fortis Hospital" and he should not have his own nursing home.
    If he does not go to any hospitals, he must have his own nursing home.

    Write a method:

    boolean isGoodDoctor(String specialization, String[] hospital, int fees, boolean haveNursingHome)

    specialization Specialization done by the doctor (say “Neurologist”, or “Gynecologist”), can be null if the doctor is only MBBS.
    hospital String array containing hospital names where the doctor holds checkup sessions, can be null if he does not go to any hospital.
    fees This parameter defines the fees this doctor charges per visit.
    haveNursingHome This parameter will be true if the doctor owns a nursing home otherwise false


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,039
    Thanks
    52
    Thanked 2,280 Times in 2,251 Posts

    Default Re: Java code for a Question

    Please post the code you are having problems with and ask any questions about it.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. code set up question
    By op117 in forum Java Theory & Questions
    Replies: 19
    Last Post: September 10th, 2012, 07:54 PM
  2. [SOLVED] Question about inline code segment
    By brighamandrew in forum Java Theory & Questions
    Replies: 2
    Last Post: September 1st, 2011, 04:40 AM
  3. This is my code and i would like to ask a question..
    By savvas in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 24th, 2011, 01:01 PM
  4. Newbie Question on a Code - I don't know if this is Java
    By fresca in forum Java Theory & Questions
    Replies: 4
    Last Post: April 7th, 2011, 08:39 PM
  5. Swin/Awt Code Question
    By Pulse_Irl in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 30th, 2010, 11:26 AM