EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
Expert Solution & Answer
Book Icon
Chapter 2, Problem 8RQ
Program Description Answer

The value 137.68 can be held by the variable types “float and double”.

Hence, the correct answer is option “D”.

Blurred answer
Students have asked these similar questions
Complete the convert() function that casts the parameter from a float to an integer and returns the result.Note that the returned value of the convert() function is printed. Ex: If the float value is 19.9, then the output is: 19 Ex: If the float value is 3.1, then the output is: 3 python def convert(d):    # Type your code here. if __name__ == '__main__':    print(convert(19.9))    print(convert(3.1))
Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: • The number of days spent in the hospital • The daily rate Hospital medication charges • Charges for hospital services (lab tests, etc.) The program should ask for the following data if the patient was an outpatient: • Charges for hospital services (lab tests, etc.) • Hospital medication charges The program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient information. Both functions should return the total charges and display it for the user. After the total charges have been calculated and displayed, write the result to a file, PatientReport.txt. You can use the techniques you learned in Chapter…
The Body Mass Index – BMI is a parameter used to measure the health status of an individual. Various BMI values depicts how healthy or otherwise a person is. Mathematically BMI = WEIGHT/ HIEGHT * HEIGHT Write a java program using either JOptionPane or Scanner to collect the following values of an individual: 1.a. Namea  b. Weight c. Height 2. Compute the BMI of that individual 3. Make the following decisions if:  a. BMI < 18.5 is under weight b. BMI >=18.5 but <25 considerably healthy c. BMI >=25 but <30 overweight d. BMI >= 30 but <40 Obesity e. BMI >= 40 Morbid Obesity 4. Display the results of the individual 5. Explain your answer
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,