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
Write a method , getemailusername, that is passed a string argument that is an email address and returns the user-name part. so
MissTica
<span>public String getemailssername (String aUser) { return aUser.substring(0, aUser.indexOf("@")); }</span>
4 0
3 years ago
A crosstab query calculates aggregate functions in which field values are grouped by _____ field(s).
Juli2301 [7.4K]

Answer:

2

Explanation:jjjj

8 0
2 years ago
Differentiate between manual and computerized accounting
AnnyKZ [126]
A manual accounting system is a bookkeeping system for recording business activity transactions, where financial records are kept without using a computer system with specialized accounting software.

A computerised accounting system is an accounting information system that processes the financial transactions and events as per Generally Accepted Accounting Principles (GAAP) to produce reports as per user requirements.
8 0
2 years ago
During which step of the problem-solving process would group members combine and elaborate on ideas? Define the problem. Analyze
slava [35]

In a problem-solving process occurring inside a group, (C) develop creative solutions would be where the members combine and elaborate on ideas.

Brainstorming would be a prominent feature during this process since group members would be encouraged to state her or his opinion and solutions about the problem that the group needs to solve.

5 0
4 years ago
The lines that can be formatted to display on the edges of cells are called _______.
vazorg [7]

Answer:

borders

Explanation:

Borders can be formatted in cells of excel or goog.le sheets. You can change width, shape, color, and whole plethora of things!

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following are advantages of a local area network, as opposed to a wide area network? select three options
    15·1 answer
  • For an IP or device that is in the local network, it's a very straight forward cache table lookup for its MAC address. How does
    5·1 answer
  • What is the keyboard command that allows you to copy text
    12·2 answers
  • Data ____________ refers to any technique that recodes the data in a file so that it contains fewer bits.​
    10·1 answer
  • Your company has an external database of payment information that they wish to populate in Salesforce. They have decided to use
    13·1 answer
  • A. What sectors are used with Foo?
    8·1 answer
  • Which statement in switch case structure transfers the control flow outside the structure? switch statement break statement case
    5·2 answers
  • What name is given to the assurance that requested information is available to authorized users upon request
    11·1 answer
  • The cpu stores the results of computations in ________.
    8·2 answers
  • Memory of the computer is measured by the following units which is = to 1 character
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!