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
sammy [17]
2 years ago
12

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.
In JAVA
Computers and Technology
1 answer:
tamaranim1 [39]2 years ago
7 0

The method calcPyramidVolume is an illustration of the java methods; where the methods are executed when called or evoked

<h3>The main program</h3>

The program written in Java, where comments are used to explain each action is as follows:

//This defines the calcPyramidVolume method

public static double calcPyramidVolume(double baseLength,double baseWidth, double pyramidHeight) {

//This calculates the volume of the pyramid

       double PyramidVolume = calcBaseArea(baseLength,baseWidth) * pyramidHeight;

//This returns the volume of the pyramid

       return PyramidVolume;

   }

Read more about java methods at:

brainly.com/question/19271625

You might be interested in
Write a function called printRange() that accepts two integers as arguments and prints the sequence of numbers between the two a
a_sh-v [17]

Answer:

def printRange(start, stop, steps = 1):

   list1 = []

   if steps > start or stop:

       print("Steps is larger than start and stop value")

       return None

   if int(start) < int(stop):

       while start < stop:

           start = start + int(steps)

           list1.append(start)

       print(list1)

   elif start > stop:

       while start > stop:

           stop = stop + int(steps)

           list1.append(stop)

       print(list1)

   elif start == stop:

       print(start)

   else:

       print("Values are not integers.")

for easier viewing:

https://www.codepile.net/pile/e95verLk

If you need help understanding comment below.

5 0
1 year ago
The objects that you place on master pages are called _____.
Studentka2010 [4]
The answer to this is A.
3 0
3 years ago
What three best practices can help defend against social engineering attacks?
lina2011 [118]

The three best practices that can help protect against social engineering are:

  • Be watchful of instructions to click on enticing web links.
  • Educate employees regarding policies.
  • Avoid disclosing your login details.
<h3>Social engineering</h3>

This refers to online crimes that are socially engineered or designed to trick victims into providing certain information or carrying out certain actions that would cause unknown harm to them or others.

For example, they may be tricked into revealing their security information or other personal information via email correspondence.

You can learn more about social engineering here brainly.com/question/26072214

#SPJ12

6 0
2 years ago
Write a function listLengthOfAllWords which takes in an array of words (strings), and returns an array of numbers representing t
vesna_86 [32]

Answer:

   public static int[] listLengthOfAllWords(String [] wordArray){

       int[] intArray = new int[wordArray.length];

       for (int i=0; i<intArray.length; i++){

           int lenOfWord = wordArray[i].length();

           intArray[i]=lenOfWord;

       }

       return intArray;

   }

Explanation:

  1. Declare the method to return an array of ints and accept an array of string as a parameter
  2. within the method declare an array of integers with same length as the string array received as a parameter.
  3. Iterate using for loop over the array of string and extract the length of each word using this statement  int lenOfWord = wordArray[i].length();
  4. Assign the length of each word in the String array to the new Integer array with this statement intArray[i]=lenOfWord;
  5. Return the Integer Array

A Complete Java program with a call to the method is given below

<em>import java.util.Arrays;</em>

<em>import java.util.Scanner;</em>

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>       String []wordArray = {"John", "James", "David", "Peter", "Davidson"};</em>

<em>        System.out.println(Arrays.toString(listLengthOfAllWords(wordArray)));</em>

<em>        }</em>

<em>    public static int[] listLengthOfAllWords(String [] wordArray){</em>

<em>        int[] intArray = new int[wordArray.length];</em>

<em>        for (int i=0; i<wordArray.length; i++){</em>

<em>            int lenOfWord = wordArray[i].length();</em>

<em>            intArray[i]=lenOfWord;</em>

<em>        }</em>

<em>        return intArray;</em>

<em>    }</em>

<em>}</em>

This program gives the following array as output: [4, 5, 5, 5, 8]

7 0
3 years ago
Which term means a cryptography mechanism that hides secret communications within various forms of data?.
andrezito [222]

Answer:

anything u have daling

Explanation:

6 0
2 years ago
Other questions:
  • How many spaces is equal to one tab on a keyboard? When I compose emails, the tab button doesn't indent for me, so how many time
    7·1 answer
  • What is the purpose of inserting SmartArt in a Microsoft Office program? (1 point)
    11·2 answers
  • What is a Limited Purpose credit card
    11·2 answers
  • Why should you not perform any personal grooming task while driving?
    5·2 answers
  • If some1 emails u and u want to know who it was how do u find that out
    10·2 answers
  • ________ is a remote access client/server protocol that provides authentication and authorization capabilities to users who are
    10·1 answer
  • ¿porque y como surge la informatica y las computadoras
    13·1 answer
  • Is an electronics standard that allows different kinds of electronic instruments to
    12·1 answer
  • What reforms were made by the British government in India after the war of independence? write any three
    5·1 answer
  • Which native windows application allows you to access basic pc settings and controls such as system information, controlling use
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!