Define a method pyramidVolume with double data type parameters baseLength, baseWidth, and pyramid Height, that returns...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a method pyramidVolume with double data type parameters baseLength, baseWidth, and pyramid Height, that returns as double the volume of a pyramid with a rectangular base. Relevant geometry equations: Volume = base area x height x 1/3 Base area = base length x base width. (Watch out for integer division). Learn how our autograder works 484924.3417574.qx3zay7 3 public class CalcPyramidVolume { m & in 10 000 4 - 5 /* Your solution goes here */ 6 7 public static void main (String [] args) { Scanner scnr = new Scanner (System.in); double userLength; 8 9 10 11 12 13 14 15 16 17 18 19 } } double userWidth; double userHeight; userLength = scnr.nextDouble(); userWidth = scnr.nextDouble(); userHeight = scnr.nextDouble(); System.out.println("Volume: + pyramidVolume (userLength, userWidth, userHeight)); Define a method computeval() that takes one integer parameter and returns 7 times the parameter. Ex: If the input is 3, then the output is: 21 2 3 public class ValueComputation { mtin 4 5 /* Your code goes here */ 6 7 8 9 10 11 12 13 14 15 16 17 18} public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int input; int result; input = scnr.nextInt (); || result computeval(input); } System.out.println(result); N Define a method pyramidVolume with double data type parameters baseLength, baseWidth, and pyramid Height, that returns as double the volume of a pyramid with a rectangular base. Relevant geometry equations: Volume = base area x height x 1/3 Base area = base length x base width. (Watch out for integer division). Learn how our autograder works 484924.3417574.qx3zay7 3 public class CalcPyramidVolume { m & in 10 000 4 - 5 /* Your solution goes here */ 6 7 public static void main (String [] args) { Scanner scnr = new Scanner (System.in); double userLength; 8 9 10 11 12 13 14 15 16 17 18 19 } } double userWidth; double userHeight; userLength = scnr.nextDouble(); userWidth = scnr.nextDouble(); userHeight = scnr.nextDouble(); System.out.println("Volume: + pyramidVolume (userLength, userWidth, userHeight)); Define a method computeval() that takes one integer parameter and returns 7 times the parameter. Ex: If the input is 3, then the output is: 21 2 3 public class ValueComputation { mtin 4 5 /* Your code goes here */ 6 7 8 9 10 11 12 13 14 15 16 17 18} public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int input; int result; input = scnr.nextInt (); || result computeval(input); } System.out.println(result); N
Expert Answer:
Answer rating: 100% (QA)
Here are two Java methods as per your instructions 1 pyramidVolume method to calculate the volume of ... View the full answer
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date:
Students also viewed these programming questions
-
What is the difference between training and career development? Of these two concepts, which is more likely to increase retention in an organization? Why?
-
(10 points) Given that ry + xy = 1. 1. Find a solution of the differential equation that satisfies the initial condition y(1) = 10. Answer: y = 2. Find a solution of the differential equation that...
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
A solid cubical block of side length 0.6 m is suspended from a spring balance. When the block is in water, the spring balance reads 80% of the reading when the block is in air. Determine the density...
-
What is the law of supply? What are the main variables that cause a supply curve to shift? Give an example of each.
-
A special purpose entity issues asset-backed securities in the following structure. At which of the following amounts of default in par value would Bond Class A experience a loss? A. 20 million B. 25...
-
Question: As a pitcher for the Cleveland Indians farm team, Randy Newsom had dreams of glory but a paycheck that was a nightmare-$8,000 for the season. Newsom came up with a clever solution: He set...
-
In the new system under development for Holiday Travel Vehicles, seven tables will be implemented in the new relational database. These tables are New Vehicle, Trade-in Vehicle, Sales Invoice,...
-
Schedule of Activity Costs Quality Control Activities Activity Cost Process audits $48,900 Training of machine operators 25,900 Processing returned products 17,200 Scrap processing (disposal) 25,200...
-
Part C: Communication [20 marks] -99 1. Investment A offers a fixed annual interest rate of 6%, compounded annually for 15 years. Investment B offers the same fixed annual interest rate of 6%,...
-
Calculate the return deviation, squared deviation, product, variance, and standard deviation for both STOCK A and B. USE CELLS A6 to A9 from the given information to complete the question. . Based ...
-
The S&P-500 ETF is trading at 1,260 today. In one year the price will either grow by 15 per cent if there is an expansion, or fall by 15 per cent if there is a recession. There are no dividends. A...
-
9. Corazon Company manufactures product Z in two-stage production cycle in Departments A and B. Materials are added at the beginning of the process in Department B. The company uses the weighted...
-
Leah is training for a competition which is four months away. Her Physique Coach has given her a new mesocycle that has her increasing repetitions first and then increasing load after a few...
-
Christie's father has been diagnosed with cancer and given one year to live. In an attempt to avoid capital gains tax, Christie transfers her stock with an adjusted basis of $32,000 and a fair market...
-
Please define collaborative and competitive teamwork.) In addition to your definitions, explain the pros and cons of each style of teamwork.
-
Table 4 of coefficients shows that the continuous variable, highest year of school completed is a significant positive predictor of variances in family income in constant dollars ( = .420, P < .001....
-
Briefly discuss the implications of the financial statement presentation project for the reporting of stockholders equity.
-
Perform a Sort Detective challenge to run several sorting algorithms without knowing which is which. Try to figure out which sorting algorithm is which on the basis of the runtime and characteristics...
-
What is the output produced from the following statements? System.out.println("name\tage\theight"); System.out.println("Archie\t17\t5'9\""); System.out.println("Betty\t17\t5'6\"");...
-
What output is produced by the following program? public class MysteryReturn { 2. public static void main (String[] args) { 3 int x = 1, y = 2, z = 3; z = mystery (x, z, y); System.out.println (x + "...
-
RJR Nabisco also had $10 billion in bonds outstanding at the time of the dividend increase in Problem 10. How would you expect the bonds to react to the announcement? Why? Reference from in problem...
-
To examine how much cash your firm has returned to its stockholders and in what form (dividends or stock buybacks) and to evaluate whether the trade-off favors returning more or less. Key Questions ...
-
To estimate earnings and cash flows on a typical project for the firm. Key Questions: 1. Does your firm have a typical investment? 2. If so, can you estimate the earnings and cash flows on a typical...
Study smarter with the SolutionInn App