Question: Please help Yes please Write a program called LastNameFirstInitialLab2. This program will have two sections. The first section will accept a measurement given in pints

Please help Please help Yes please Write a program called LastNameFirstInitialLab2. This program will
Yes please

Write a program called LastNameFirstInitialLab2. This program will have two sections. The first section will accept a measurement given in pints and then converts it to the equivalent number of (a) quarts, (b) gallons, and (c) liters. (quart = 2 pints, gallon = 8 pints, liter=2.113383 pints). The second part of the program will have you playing with the increment operator, an augmented operator, and the pow method. You will get the number of pints from the user and do the conversion to quarts, gallons, and liters. After you do the conversion, you will output the results as shown in the run screen. You will not worry about the number of decimal places shown. We will be looking at how to improve formatting later in this course. Note: The identifiers QUARTS, GALLONS, and LITERS will be constants. These declarations lines will be under the class header line, but before the main method. These are constants; they would, therefore, be available to any method in the program. For the second section of your program, after you calculate and display these conversions, you will do these things in order: 1. Use the increment operator to increase the value of pints by 1. You will then print out pints. 2. You will then use the augmented operator to increase the value of pints by three times and then print out pints 3. Lastly, you will use the pow method to calculate pints' and then print that out. You may use this method within the print line Use the variable names shown in the design diagram Input Pints Output Calculated QuartsEquiv Calculated GallonsEquiv Calculated Liters Equiv Pints Process Calculate the equivalent Quarts. Gallons, and Liters Display the results Calculate Pints increased by 1 Display Pints Calculate Pints multiplied by 3. Display Pints Calculate Pints to the power of 3 Display the result

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!