1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
cluponka [151]
3 years ago
7

Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a d

ouble the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation. Relevant geometry equations: Volume
Computers and Technology
1 answer:
Rudik [331]3 years ago
6 0

Answer:

import java.io.*;

public class Main {

   public static void main(String[] args) throws IOException {

       double baseLength = 0, baseWidth = 0, pyramidHeight = 0;

       Object[] volume;

       volume = calcPyramidVolume(baseLength, baseWidth, pyramidHeight);

   }

   public static Object[] calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight) {

       double area = calcBaseArea(baseLength, baseWidth);

       double volume = baseLength * baseWidth * pyramidHeight;

       return new Object[]{volume, area};

   }

   public static double calcBaseArea(double length, double width) {

       return length * width;

   }

}

Explanation:

The problem is flawed because it is completely inefficient for one to create two separate methods to calculate the volume and the area when they can be done at once.

The second problem is that it was never specified whether to return something from the calcBaseArea method.

I assumed it required it, so it is not advisable to initiate the method as a double, but rather create it as an Object so that it can return two values: the volume and the area.

You might be interested in
Jamie plans to sell his pottery designs through his website. If he also wants to launch a mobile app to reach more people, which
Liula [17]
He should launch an M-commerce app
5 0
2 years ago
Identify the data set level of measurement for the following: individual tax filing status (single, head of household, widowed,
Snowcat [4.5K]

Answer:

Option (B) Nominal is the correct option.

Explanation:

Nominal data set is the set of the heights of data measurement for the particular tax filing status. It also used for the labeling of the variables without allowing them to the quantitative data type. So, that's why the following option is correct.

Other options are wrong because the following statement is related to the Nominal data set.

6 0
3 years ago
Is iPhone better than android
andriy [413]

Answer:

It's up to personal preference.

Explanation:

iPhone/Apple gives more compliments to security than Android.

Android has more friendly user GUI and dev tools.

4 0
3 years ago
Read 2 more answers
Calculate the number of telephone
olchik [2.2K]

Answer:

yho

Explanation:

hayi no ntwana.... lala boy

6 0
3 years ago
What are two type of physicals connection
netineya [11]
Two types of physical connection are:

A wired connection using a cable

A wireless connection using radio waves
7 0
3 years ago
Other questions:
  • 1. How does inertia affect a person who is not wearing a seatbelt during a collision? 
    14·2 answers
  • Data mining must usestatistics to analyze data.<br> True<br> False
    12·1 answer
  • Which one of the following is a functional requirement? Select one: a. None of the mentioned b. Robustness c. Maintainability d.
    10·1 answer
  • As the new manager at your local grocery store, you want to create a more efficient inventory process by allowing outside vendor
    6·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • n physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initia
    9·1 answer
  • People who enjoy working with their hands might enjoy a career as a/an
    9·1 answer
  • What are the factors that affect self-confidence?
    15·1 answer
  • Ethan wants to change the font in his document. He should _____.
    8·1 answer
  • What the difference between an operating system drive and a storage drive?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!