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]
2 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]2 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
What allows your computer to communicate over a network and access the Internet?
geniusboy [140]

Answer:

To connect to the Internet and other computers on a network, a computer must have a NIC (network interface card) installed.

Explanation:

A network cable plugged into the NIC on one end and plugged into a cable modem, DSL modem, router, or switch can allow a computer to access the Internet and connect to other computers. ISPs (Internet service providers)

5 0
2 years ago
(tco 5) how many 4-bit parallel adders are required to add the numbers 5,345 and 3,892? explain how you got your answer.
Igoryamba
The sum is 9237. To express this as binary requires log(9237)/log(2) bits ≈ 13.2 bits, rounded up at least 14 bits. (You can check: 2^13 is not enough, 2^14 is enough)

So you need four 4-bit adders, giving you 16 bits resolution.
7 0
3 years ago
The HR department of a company has to send an email notifying an employee of a work performance issue. The manager of this emplo
vivado [14]

The HR department could send the email using the blind copy feature to send it to the manager.

The bcc (blind carbon copy) feature will send a copy of the email to the designated person without the primary recipient knowing that it was sent to them. There is no indication in the email that shows that a message was blind copied.

7 0
3 years ago
X³ + y³ + z³ = k
Kazeer [188]

Answer:  x³+y³+z³=42

- Z poważaniem

5 0
2 years ago
Read 2 more answers
Which of the following is a benefit, as well as a risk, associated with client/server networks?
melomori [17]
A. IT professional, who maintains the network, must be added and removed from the network. - risk 
B. Clients work independently; therefore, if one computer is not working, other computers can still do their jobs.  - benefit (scalability is always a benefit)
C. Security levels are set up by individuals; therefore, these networks may not be as secure. - risk
D. There is no need for a big IT department to keep the network up and running. - benefit (it is simple for maintenance)
7 0
3 years ago
Read 2 more answers
Other questions:
  • A company is a Microsoft 365 reseller. The company does not provide managed services or direct customer support. You need to pro
    10·1 answer
  • Is the conversation recorded when the party answers or when they dial the number?
    7·1 answer
  • The amount of magnification gained from the extension tube is dependent on the focal length of the lens.
    12·2 answers
  • Which function can you perform on a word processor but not on a typewriter?
    15·2 answers
  • Ujqwgydft frrhyy4e uvbw vhrwbhv vbyrewblv?
    14·1 answer
  • The Leal button is located in the
    7·1 answer
  • When converting text to a table, which feature should be used?
    12·1 answer
  • How many types of video<br>compressions__<br>a. 4<br>b. 2.<br>• c. 3<br>d. 6​
    15·1 answer
  • What is digital museum​
    9·2 answers
  • You can open a movie maker project file any time in a media player. (1 point) true false
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!