Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PROGRAMMING - RECURSION ONLY Imagine that you have a human pyramid where each person in a row is balanced on the two people below
JAVA PROGRAMMING - RECURSION ONLY
Imagine that you have a human pyramid where each person in a row is balanced on the two people below them, as in the following diagram: Each row has one fewer person than the row above them, and each person carries the weight of themselves plus half the weight carried by the two people standing on them. For example if you have a pyramid of people with the following weights: 140.3 125.3 134.2 180.9 175.6 The person on the top carries only their own weight (111.3). The people in the next row carry their weights (140.3 and 125.3, respectively) and half of the weight of the person on the top (111.3/2 5555), so the total weight carried by the people in the second row is 195.95 and 180.95, respectively. Finally the people in the bottom row carry their own weight, plus half the weight carried by the people standing on them. So the total weights at the bottom row are: 134.2 + (195.95/2) = 232.175, 180.9 (195.95/2 180.95/2) = 369.35, and 175.6 + (180.95/2) = 266.075 Implement the method public static double humanPyramidweight ( ArrayList
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started