A. Write a Java program that reads a student's full name (including first and last name),...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A. Write a Java program that reads a student's full name (including first and last name), age, weight (in Kilograms) and height (in meters) from the keyboard. It should: ● ● Extract the student's first name and display it in lowercase letters, Extract the student's last name and display it and display it in uppercase letters, Calculate the student's Body Mass Index (BMI) and display an appropriate message as per the table below: BMI Value Less than 18.5 Message Underweight Healthy Weight Overweight Obese Over 30 Note: Body mass index (BMI) is a person's weight in kilograms divided by the square of height in meters (weight (kg) / [height (m)]2). This formula applies only for age greater than 20. Otherwise, an appropriate message should be displayed. Between 18.5-24.9 Between 25-29.9 B. The University offers four different types of discount ('A', 'B', 'C', and 'X') based on students' CGPA, as shown below: Discount Type A B C X Amount discounted per semester AED 2000 AED 2500 AED 2000 AED 5000 Extend your program to allow the student to enter a type of discount. The program should display the amount of money discounted for the given type of discount for the current semester. You should use the switch statement when implementing this part. A. Write a Java program that reads a student's full name (including first and last name), age, weight (in Kilograms) and height (in meters) from the keyboard. It should: ● ● Extract the student's first name and display it in lowercase letters, Extract the student's last name and display it and display it in uppercase letters, Calculate the student's Body Mass Index (BMI) and display an appropriate message as per the table below: BMI Value Less than 18.5 Message Underweight Healthy Weight Overweight Obese Over 30 Note: Body mass index (BMI) is a person's weight in kilograms divided by the square of height in meters (weight (kg) / [height (m)]2). This formula applies only for age greater than 20. Otherwise, an appropriate message should be displayed. Between 18.5-24.9 Between 25-29.9 B. The University offers four different types of discount ('A', 'B', 'C', and 'X') based on students' CGPA, as shown below: Discount Type A B C X Amount discounted per semester AED 2000 AED 2500 AED 2000 AED 5000 Extend your program to allow the student to enter a type of discount. The program should display the amount of money discounted for the given type of discount for the current semester. You should use the switch statement when implementing this part.
Expert Answer:
Answer rating: 100% (QA)
The Java program that fulfills the given requirements import javautilScanner public class StudentI... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Read this scenario scenario - Alternative Formats then post to the discusson board, making sure to address each of the following : What advantages do you see to signing the agreement? What...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Find the values of the parameter p > 0 for which the following series converge. In k
-
Explain why it is important for marketing researchers to be knowledgeable of research design.
-
A furnace wall is to be constructed of brick having standard dimensions of 22.5 cm 11 cm 7.5 cm Two kinds of material are available. One has a maximum usable temperature of 1040C and a thermal...
-
Jose Medellin participated in the rape and murder of two teenage girls in Houston, Texas. He was arrested and read his Miranda rights, and he confessed. At the time, he was not informed that he could...
-
Error Analysis and Correcting Entry the reported net incomes for the first 2 years of Sinclair Products, Inc., were as follows: 2010, $147,000; 2011, $185,000. Early in 2012, the following errors...
-
15. A simple LR circuit is connected to a battery at t = 0. The time instant at which rate of energy storage in inductor is half of power delivered by battery (a) In 2 (c) In 2 (b) In () (d) In 3 16....
-
Here are some diagnostic plots for the final exam data from Exercise 13. These were generated by a computer package and may look different from the plots generated by the packages you use. (In...
-
Using the DET2TL program, recommend the most profitable configuration of a two-machine deterministic processing time line. The machines are the same. Now, there is no target production rate. Instead,...
-
At the conclusion of a second-year practical session, two groups of students engage in a heated debate. Group A students are certain that their results (Table 1) are statistically comparable to those...
-
A fleet of vehicles is comprised of 60 vans, 20 limos, and X sedans. If 10% of all vehicles are limos, how many sedans are in the fleet?
-
Anika who lives in Vancouver, purchased a piece of equipment from Australia for A$45,400. He was charged 19% duty, 5% GST, and 7% PST to import it. Calculate the total cost of the equipment. Assume...
-
Find the x and y intercept For the equation y= 2 x+1, Part: 0/3 Part 1 of 3 (a) Find the x-intercept. The x-intercept is DD
-
The population of a colony of bacteria grows according the formula P(t) = 4(1.40) 24 where: P represents the population t represents time in hours How long, to the nearest hour, does it take the...
-
On January 1, 20X7, Pepper Company acquired 90 percent of the outstanding common stock of Salt Corporation for $1,242,000. On that date, the fair value of noncontrolling interest was equal to...
-
In Exercises discuss the continuity of each function. f(x) -3 1 x - 4 y 3 2 -1 -2 -3+ 3 X
-
What are the advantages to using object-oriented techniques?
-
List the elements of the three-by-five jagged array sales in the order in which theyre set to 0 by the following code segment: for (var row = 0; row < sales.Length; ++row) { for (var col = 0; col <...
-
Fill in the blanks in each of the following statements: a) Objects, or more precisely the________ that objects come from, are essentially reusable software components. b) You send messages to an...
-
What minimum information must be extracted from a video clip of a moving object in order to quantify the object's motion?
-
The sequence in Figure P2.2 represents a ball rolling into a wall and bouncing off of it. The ball is \(10 \mathrm{~mm}\) in diameter. Make a graph showing the distance from the leading edge of the...
-
The sequence in Figure P2.3 represents a ball that is initially held above the ground. In the first frame the ball is released. In subsequent frames the ball falls, bounces on the ground, rises, and...
Study smarter with the SolutionInn App