Question: Please help. The input values should be doubles and the program with Java doc comments. Specifications Overview: You will write two programs this week. One

Please help. The input values should be doubles and the program with Java doc comments.
 Please help. The input values should be doubles and the program

Specifications Overview: You will write two programs this week. One will determine the area of a pyramid given the base and slant height of the pyramid. The other will calculate the numbers of burrels, gallons, quarts, and ounces in the number of liquid ounces entered by the user The valued entered by the user must not exceed one billion * AreaPyramid.java Requirements: A program is nceded that reads in the hase and slant height of a square-hased pyramid, and then calculates the area of the pyramid using the following formula Slant height base x slant area - base x basest hedht Base Design: The main method ofthe program should allow the to cnr the values representing the pyramid as showm below, and then read in the valucs and store them in appropriately named variables of type double. After the values are read, the formula above is used to compute the area, afier which the results are printed as shown below The following examples show the program input output (10). Values entered by the user are indicated by red foet Page 1 of 3 Project: Variables and Expressions Page 2 of 3 Example 1 Enter values for base andlast height of a pyramid; base 10 slant height15 15.0 A Pyramid with base " 10-0 and #lant height has an area of 400.0 square units Note that lines 2 and 3 begim with tab (ic output should use the escape sequence for a tab Line 4 is a blank line- consider printing a new line escape sequencen. Example 2 Enter values for base and slant beight of a pyranid bas 12.75 slant height12-7 SA pyranid with base 12.75 and slant height12-75 has an area of 487-6875 square unies. Code: Create a Scanner object on System.in to eadthe values for te Pyramid. The values of type double should be pead in using the nextDouble method the Saner class

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!