Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Language: JAVA Recursion program A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in

Programming Language: JAVA

Recursion program

image text in transcribed

A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in the bottom row each person splits their weight evenly on the two pcople below them in the pyramid. For example, in the pyramid above, the person on the first row is supported by both people on the second row The first person on the last row is his left shoulder while the second person on uil the last row is supporting the other half on his right shoulder, plus he has weight on his left shoulder from the person standing on it. Your job is to write a recursive program that will display how much weight a person is holding. You can assume that each person weighs 200 pounds. Your program will ask the user for a row and column and your program will display the weight that is being supported by that person. Your program will continue in a loop - asking enters 0 and 0 for the row and column. Here is an example: the user for a row and column until the use www.shutterstock.com 113454715 Welcome to the Human Pyramid. Select a row, column combination and I will tell you how much weight that person is supporting Please type your selections for Row and Column: 1 1 I/User types 1 for row and 1 for column ban car Person at (1,1) is supporting 0 pounds. Please type your selections for Row and Column: ba . 2 1 // User types 2 for row and 1 for column Person at (2,1) is supporting 100 pounds. Please type your selections for Row and Column: 4 3 // User types 4 for row and 3 for column Person at (4,3) is supporting 425 pounds. Please type your selections for Row and Column: 00 //User types 0 for row and 0 for column Thanks for playing Human Pyramid. Don't let me down! Question: Is there a limit to how tall your pyramid can be? A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in the bottom row each person splits their weight evenly on the two pcople below them in the pyramid. For example, in the pyramid above, the person on the first row is supported by both people on the second row The first person on the last row is his left shoulder while the second person on uil the last row is supporting the other half on his right shoulder, plus he has weight on his left shoulder from the person standing on it. Your job is to write a recursive program that will display how much weight a person is holding. You can assume that each person weighs 200 pounds. Your program will ask the user for a row and column and your program will display the weight that is being supported by that person. Your program will continue in a loop - asking enters 0 and 0 for the row and column. Here is an example: the user for a row and column until the use www.shutterstock.com 113454715 Welcome to the Human Pyramid. Select a row, column combination and I will tell you how much weight that person is supporting Please type your selections for Row and Column: 1 1 I/User types 1 for row and 1 for column ban car Person at (1,1) is supporting 0 pounds. Please type your selections for Row and Column: ba . 2 1 // User types 2 for row and 1 for column Person at (2,1) is supporting 100 pounds. Please type your selections for Row and Column: 4 3 // User types 4 for row and 3 for column Person at (4,3) is supporting 425 pounds. Please type your selections for Row and Column: 00 //User types 0 for row and 0 for column Thanks for playing Human Pyramid. Don't let me down! Question: Is there a limit to how tall your pyramid can be

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago