Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation. Relevant geometry equations: Volume

Answers

Answer 1

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.


Related Questions

Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type of game would you create for each generation based on that generation’s psychographic characteristics? Give reasons for your choices. You may do some online research to find existing games (if any) that may appeal to each generation of players.

Answers

Answer:

sorry I don't know about this question


Your sister has just emailed you an attached file with the invitation list for her upcoming party.
Which of these tells you what type of file it is?
A. Folder name
B. File name
C. Extension
D. Call Number

Answers

Answer:

The file Extension so the answer is C

C. The extension is the answer to your question

What is another name for a switch A.Number system B.Variable C.Logic Gate D.Boolean

Answers

Answer:

logic gate

Explanation:

took the test lol

Wht roles do computer play at home?​

Answers

Computers are used at homes for several purposes like online bill payment, watching movies or shows at home, home tutoring, social media access, playing games, internet access, etc. They provide communication through electronic mail.

To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to buttress your answer).

Answers

The assertion that collection development starts with community analysis is logically correct.

The collection development policy is vital for setting goals for the collection that mirror the missions of the library. It gives information to the stakeholders of the library about how the collection will be chosen, and who will make the decisions regarding the collection.

Collection development starts with community analysis. The collection plan should follow a logical process in order to be effective. The community should be taken into consideration before the plan is carried out. The more one knows about the community, the better it'll be to make the collection plan effective.

Read related link on:

https://brainly.com/question/21529943

10 sentences about computer parts.

Answers

One computer part is the CPU, it’s a piece of hardware the last allows your computer to access and interact all the applications and programs. The first ever CPU chip was invented around 4 decades ago. The keyboard is another computer part and it allows the user to type letters and numbers. There are about 104 keys on a keyboard and there are different parts in it. Some of the parts include, control keys, function keys, navigation keys, numeric keypad, and so on. A mouse is another device used with the keyboard to position the cursor. It’s a hand held device that detects two-dimensional motion relative to a surface. This motion is typically translated Into the motion of a pointer on a display, which allows a smooth control of the graphical user. Memory is a device to store all of your information and saved data. The motherboard is the backbone that tied together the computers components at one spot.

If known vulnerabilities in software are entry points for an attacker, why are the software vulnerabilities not corrected before the software is released?

Answers

Answer:

we dont knoqw

Explanation:

The developer hasn't had enough time to address them, these flaws are referred to as "zero days." is the software vulnerabilities not corrected before the software is released.

What is software?

Software is a set of instructions, information, or computer programs that are used to operate equipment and perform certain tasks. Hardware, which is a term for a computer's external components, is the opposite of it. In this usage, "software" refers to the running scripts, programs, and apps on a device.

The procedures and software that make it possible for a computer or other electrical equipment to operate are referred to as software. Examples of the processes and programs that make up a computer system are Excel, Windows, and iTunes.

System software consists of the programs and processes required to run the computer. System software, utility software, and application software are the three subcategories of software.

Thus, The developer hasn't had enough time to address them.

For more information about software, click here:

https://brainly.com/question/985406

#SPJ2

What protocol is used to discover the hardware address of a node with a certain IP address?

Answers

Answer: ARP hope this helps

Complete the following sentences by either filling in the blank or writing out the rest of the sentence (when there is a … ):

The internet is made up of _________ networks that all connect together to make a ____________ network.

The job of a router on the internet is to…


Clients allow people to…


Servers store _____________________ and send those to _____________ over the internet.


The internet is physically connected across the world using _______________


Computers break up information, like photos and emails, into ________________



The ___________ protocol tells computers how to break up the information and orders it.


The ________________ protocol tells the packets where they are going and where they are coming from.


The packets get to their destination by…


When the packets get to their destination, the __________ protocol…



Computers get the _______________ of servers by asking the ______________



Computers use the _____________ protocol to display a webpage.

Answers

Answer

hundreds,  massive, connect to the internet gigabytes, people, computers,

bytes, TCP/IP, TCP, internet, TCP, answers, questions, HTTP

Explanation:

Which statement correctly describes one aspect of the team's commitment at the end of PI Planning?

Answers

The statement that describes an aspect of the team's commitment at the end of PI Planning is to maintain predictability with uncommitted objectives.

A program increment (PI) simply means a timebox during which an agile release train helps in delivering incremental value in the form of tested and working systems and software.

A program increment (PI) is usually eight to twelve weeks long. An aspect of the team's commitment at the end of PI Planning is to maintain predictability with uncommitted objectives.

Read related link on:

https://brainly.com/question/23060988

full meaning of XP in computer​

Answers

Answer → eXPerience

Write a method named removeDuplicates that accepts as a parameter a List of integers, and modifies it by removing any duplicates. Note that the elements of the list are not in any particular order, so the duplicates might not occur consecutively. You should retain the original relative order of the elements. Use a Set as auxiliary storage to help you solve this problem.

For example, if a list named list stores [4, 0, 2, 9, 4, 7, 2, 0, 0, 9, 6, 6], the call of removeDuplicates(list); should modify it to store [4, 0, 2, 9, 7, 6].

Answers

The method is an illustration of loops or iteration.

Loops are used to carry out repetitive operations.

The removeDuplicates method in Python is as follows, where comments are used to explain each line.

#This defines the method

def removeDuplicates(list):

#This initializes the output list

   outputList = []

#This iterates through the list

   for i in list:

#All elements not in the output list, are appended to the output list

       if i not in outputList:

           outputList.append(i)

#This returns the output list

   return str(outputList)

At the end of the method, the new list contains no duplicates.

Read more about similar program at:

https://brainly.com/question/6692366

Which of the following factors is most likely to result in low shipping and handling costs? A higher than average hourly pay rate for material handlers A rare but high-in-demand packaging material A promotion for free shipping on orders over a predetermined order total All of the above​

Answers

Answer: A higher than average hourly pay rate for material handlers

Explanation:

Shipping and handling cost describes costs related to the total cost of an ordered item which are included in the fees used to deliver the item to the buyer. Hence, the correct option is C

Shipping and handling cost usually depend on the size of the item, the buyer's location and fragility of the item purchased.

From the options given, handling and shipping fee may be reduced as a result of free promotional shipping on orders.

Handler and drivers who are paid above average will result in increased shipping fee and rare in-demand items won't come cheap either.

Hence, low shipping fee will most likely be as a result of promotion for free shipping on orders over a predetermined order total.

Learn more : https://brainly.com/question/20533392

ACTIVITY NI MATCHING TYPE Directions: Match Column A with Column B. Write the letter of the correct answer on the space provided before the number a. Trion your nails b. visits the dentist c. scrub your hands with soap and water d. wear deodorant taking a bath 18111411 hely wear suitable clothes at work g. avoidis open wounds while working with food h. Regularly out your hair. 1. Use a seperate towel or cloth wiping hands. . keep sanitizer. 10.​

Answers

Answer:

Mark me a brainless plss i need that i am blink plss

What is the relationship between the speed of an object in the amount of energy it has? explain

Answers

Light energy into Chemical energy

where and when to implement such network.

Answers

i think it is a

and it is b , so haha

Define cloud, and explain the three key terms in your definition. Compare and contrast cloud-based and in-house hosting using the comparison presented in Q6-1 as a guide. In your opinion, explain the three most important factors that make cloud-based hosting preferable to in-house hosting.

Answers

Cloud computing is making hardware, software and data available on demand via a network.

The cloud stands for a network that, with all the computers connected to it, forms a kind of 'cloud of computers', where the end user does not know how many or which computer the software runs on or where those computers stand exactly.

In this way, the user no longer needs to be the owner of the hardware and software used and is therefore not responsible for maintenance. The details of the information technology infrastructure are hidden from view and the user has his own virtual infrastructure, scalable in size and possibilities.

Learn more in https://brainly.com/question/8645052

Identify the following verb by number and person by checking on the appropriate boxes.

SHE WANTS!!


second person
singular
plural
same form for both singular and plural
third person
first person PLEASE HELP!!!!!! LAUNGUAGE ARTS

Answers

second person ig Imao yeah

Answer:

Singular and third person

Explanation:

Second person: this answer is not correct as second person refers to pronouns such as “you, yourself” like in a recipe.

Singular: this is correct as a singular verb is when there is only one subject. You can also tell it’s a singular verb as the present tense ends with a “s”.

Plural: this is not plural because there is only one subject. Plus the present tense of the verb ends with an s so it’s not a plural verb. Plural verb’s present tense never ends with an s.

Third person: this is correct because the subject of the sentence is someone else. Third person pronouns include: “her, she, he, him, they, then” basically, third person is when you talk about someone else.

First person: this answer is not correct because first person refers to one’s self. So first person pronouns are: “I, me, myself”

If you wanted to multiply two numbers, you would use the _____ key.


-

*

=

/

Answers

* because it’s like the dot or the x

1.(154)10=(?)2
help me! I will give 25 points.​

Answers

Dang dude that seems like a head problem hopefully you’ll get the answer soon

Which of the following was the most significant impact the NEA had on the performing arts industry? W
It created more performance spaces.
O It increased awareness of the performing arts.
It increased production of the performing arts.
O It created more jobs.
Save and Exit
Next
Submit
dan

Answers

Answer:

The NEA’s focus on building new performing arts centers led to an increased production of arts.

Draw a conceptual sketch of your laptop. Identify the keyboard, screen, power source, and storage device and etc. using arrows and labels.

Answers

Answer: 12345678910111213141516171819202122

am i the only one that finds so much bots on peoples pages lol

Answers

Nah, I see that too lol

Not Answered 17.Not Answered 18.Not Answered 19.Not Answered 20.Not Answered Question Workspace Jessica wants to purchase a new hard drive. She wants a drive that has fast access because she will use it to edit videos on her PC. She also needs a lot of storage and wants to have at least 4 TB available to save her videos. Jessica wants to keep the cost down as much as possible possible. What type of hard drive should Jessica purchase?

Answers

Answer: HDD 7200RPM

Explanation:

a solid state drive is going to be so much money especially if its 4 TB so just get a HDD 7200RPM or even better if its higher revolutions per minute......

Define a class named Bits that holds a single integer variable. You will use this integer simply as a container of bits. The number of bits you can support depends on the type of integer you use. We will use an unsigned long long, which on most platforms occupies 64 bits.

Answers

In two or more integer plat forms

4. Identify which type of algorithmic operation each one of the following steps belongs to: a. Get a value for x from the user. b. Test to determine if x is positive. If not, tell the user that he or she has made a mistake. c. Take the cube root of x. d. Do Steps 1.1, 1.2, and 1.3 x times

Answers

Answer:

a. input/output

b. if/else statement

c. while loop

Explanation:

I don't know, sort of...

What is the purpose of a computer network needs assessment? to evaluate how to move from the current status to the desired goal to determine what steps employees can take to increase company revenue to analyze which workers need more training to improve their performance to compare worker productivity

Answers

Answer:

to evaluate how to move from the current status to the desired goal

You should move around and take a rest for 30 minutes every 5 minutes.

True Or False​

Answers

Answer:

obviously true.........

Can I please get an answer, it's for computer science.

Answers

Answer:

I believe the answer would be B. C. and D.  A, wouldnt make sense, as GitHub doesn't have that as a feature. I hope this helps! :)

Answer:

ok im not 100% sure this is right but i also don't pay attention in any of my classes except music so i would maybe say options D,B, and A

Explanation:

Why did the spelling and grammar checkers in Word miss the errors highlighted in yellow?


please help, im vv confused

Answers

Answer:

I do believe that it is a grammar mistake.

Other Questions
20. Write the following equation in slop intercept form. -4x-3y=-18.21. Write the following equation in slope intercept form. -2x+3y=21please show your work and thank you. when someone uses your personal information to pose as you this is How does Climate directly affect how people live in a country as well as how people interact with the place they live in? Based on the results of the genetic crosses you have shown how think the red and white flower alleles can "interact with one another? Explain both the F and F generations. ps.. ill mark you the brainliest During the middle of the 19th century, an American militia member was found to be a British spy who was sent to the United States by the King England. Since he was found to be a traitor, he became an American political prisoner. What sort of punishment was he MOST LIKELY sentenced to, given the time and place of his crime and sentence?RehabilitationCapital punishmentIncarcerationdeterrence why did commodore perry lead a small fleet of ships to japan? consider the linear function f(x)=4x-5 Find the values of x for which f(x)=3,f(x)=5,f(x)=-3 1. what kind of technology are students experiencing in the classroom 2. do students perceived certain educational technology environment as being more conducive to their learning 3. Are there difference in how various subpopulations of students view the effectiveness of various learning technology environment discuss what these phrases mean to you; 1/ a yellow woods In a movie theater, the first row contains 3 seats, the second row contains 6 seats, the third row contains 9 seats, and the fourth row contains 12 seats.A.) Write explicit rule for sequenceB.) Write recursive rule for sequence. in roman mythology, who was goddess of the hearth and home? a farmer has pigs and chickens in the ratio 3:8. if she has 360 pigs, how many chickens does she have model of a cell cycle Find the length of the hypotenuse in the triangle below vit pthh xy ra khi oxi phn ng vi kim loi K, Mg, Al The Turtle Bayou Resolution happened before the Mexican Constitution of 1824 Wasestablished.TrueFalse 1. A rock sample has a mass of 16 grams:and a volume of 8 cubic centimeters.When the rock is cut in half, what isthe volume and density of each piece?(1) 8 cm3 and 0.5 g/cm3(2) 8 cm and 1.0 g/cm3(3) 4 cm' and 2.0 g/cm3(4) 4 cm3 and 4.0 g/cm31 Match the organism with the biome where you would expect to see it. Option isAASASNot enough information to prove similaritySSS use the quadratic formula to find both solutions to the quadratic equation given below