Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Project: ENG 1221 Repetition Project Background: Your manager at the local supermarket has asked you to create a produce display; hes asked you to

MATLAB Project:

ENG 1221 Repetition Project Background: Your manager at the local supermarket has asked you to create a produce display; hes asked you to build a pyramid of apples from the upcoming shipment. The pyramid should be erected such that each square of four apples in one layer supports one apple on the next layer. Example shown to right: Top layer (1 apple) Next layer (2 rows, 2 columns, i.e., 4 apples) Base layer (3 rows, 3 columns, i.e., 9 apples) Tasks: You are asked to compute each of the following items. Note: between items, you may or may not choose to duplicate or reuse any of your own code. Given a specified number of layers, how many apples will be used? Show test cases: 5, 7, and 10 layers. Not enough apples are being displayed. Given the dimension of the base of a square pyramid and the total number of apples to be displayed, how many complete, square pyramids can be made? How many apples are left over? Show test cases: 5x5 base from 1000 apples, 8x8 base from 800 apples media%2F4e2%2F4e2004e6-8833-44b4-8717-0bThese square pyramids would take up too much space to make good displays. You propose making pyramids with rectangular bases. Given the dimensions of the base, how many apples will be used? Show test cases: 8x16 base 10x32 base media%2Ff02%2Ff02a92bc-7001-4cf8-8b49-eaYour manager tells you that you dont need to use all of the apples; the important part is to use as many apples as you can without bruising them. You figure you can probably only stack the apples to a certain height before they will bruise. Given the dimension of the base and the maximum number of layers, how many apples will be used? What are the dimensions of the top layer? Show test cases: 10x16 base with 8 layers, 12x32 base with 10 layers. With so many apples in rectangular pyramids, your manager is concerned that the apple display will be so tall that it will interfere with the low-hanging signage in the store; the signage is only 2 feet above the surface of the display table. You think you can get a good estimate of the height of the apple display if you assume that the apples are spherical. You also simplify the height calculation by assuming each layer is 1 apple-diameter thick. Given the approximate apple diameter, the dimensions of the base, and the number of apples: How many layers of apples will fit on the display table without touching the sign? How many apples are left over? How tall is the pyramid (in inches and in number of layers)? Show test cases: 3.25 inch diameter, 10x16 base, max 10 layers, sign height 2 feet, 1000 apples are available, 2.75 inch diameter, 14x32 base, max 13 layers, sign height 2 feet, 1200 apples are available. Bonus (~5 pts): Repeat the previous task without the assumption that a layer is 1 apple-diameter thick. Visualize the problem in 3 dimensions and use geometry. Bonus (~15 pts): Create a script file to generate 3D figures of pyramids or incomplete pyramids as in the figures above. New commands: sphere, view, surf, and camlight. Hint: make each sphere individually.

image text in transcribed

ENG 1221 Repetition Project Background Your manager at the local supermarket has asked you to create a produce display he's asked you to Pyramid of apples from the upooming shipment. The pyramid should be erected such that each square of four apples in one layer supports one apple an the next layer. Example shown to right: www.123rf.com Top layer (1 apple) Next layer (2 nows, 2 oolumns, i. e, apples) Base layer (3 nows, 3 columns, ie 9 apples) You are asked to compute each of the folowng tems. Note: between items, you may or may not choose to duplicate or reuse any of your own code. your instructor-provide apseudocode and Rogical dagram for each task. The pseudocode can be presented as camments and the Magical tiagram hand drawn. 1. Gwen a specified number of ayers, how many apples will 5, 7 and 10 layers. being diplayed. Gven the dimension of the base of a square 2. Not enough apples are pyramid and the total number of apples to be dsplayed, how many complete, square pyramids can be made? How many apples are left over? Show test cases: a. base from 1000 apples, b. BrB base from 800 apples 3. These square pYramids would take up too much space to make good displays You propose making pyramids with rectangular of the base, how many apples will be used? Show test Your manager tells you that you don't need to use all of the apples; the important part is to use as many apples as you can without bruising them. You figure you can probably only stack the apples to a certain height before they wil bruise. Given the dimension at the base and the maximum number of layers, how many apples will be used? What are the di of the top layer? Show test cases: a. 10x16 base with layers, b. 12x32 base with 10 layers. 5. With so many apples in rectangula Pyramids. Your manager is concerned that the apple display wil beso tal that it wil interfere with the low hanging signage in the store: the signage isonly 2 feet above the surface of the displaytable. You think get a good estimate of the height of the apple display you assume that the apples are spherical. You also simplify the height calculation by assumi ing each layer is lappie diameter thick. Given the approximate apple diameter, the of the base, and the number of apples: How many layers of apples will fit on the display tabie wthout touching the sign? How many apples are keft over? How tal is the pyramid in inches andin number of layers)? Show test cases 0x16 base, max 10 layers, sign height 2 feet, 4000 apples are available, 432 base, max 13 layers, sign height 2 feet, 1200 apples are available. ENG 1221 Repetition Project Background Your manager at the local supermarket has asked you to create a produce display he's asked you to Pyramid of apples from the upooming shipment. The pyramid should be erected such that each square of four apples in one layer supports one apple an the next layer. Example shown to right: www.123rf.com Top layer (1 apple) Next layer (2 nows, 2 oolumns, i. e, apples) Base layer (3 nows, 3 columns, ie 9 apples) You are asked to compute each of the folowng tems. Note: between items, you may or may not choose to duplicate or reuse any of your own code. your instructor-provide apseudocode and Rogical dagram for each task. The pseudocode can be presented as camments and the Magical tiagram hand drawn. 1. Gwen a specified number of ayers, how many apples will 5, 7 and 10 layers. being diplayed. Gven the dimension of the base of a square 2. Not enough apples are pyramid and the total number of apples to be dsplayed, how many complete, square pyramids can be made? How many apples are left over? Show test cases: a. base from 1000 apples, b. BrB base from 800 apples 3. These square pYramids would take up too much space to make good displays You propose making pyramids with rectangular of the base, how many apples will be used? Show test Your manager tells you that you don't need to use all of the apples; the important part is to use as many apples as you can without bruising them. You figure you can probably only stack the apples to a certain height before they wil bruise. Given the dimension at the base and the maximum number of layers, how many apples will be used? What are the di of the top layer? Show test cases: a. 10x16 base with layers, b. 12x32 base with 10 layers. 5. With so many apples in rectangula Pyramids. Your manager is concerned that the apple display wil beso tal that it wil interfere with the low hanging signage in the store: the signage isonly 2 feet above the surface of the displaytable. You think get a good estimate of the height of the apple display you assume that the apples are spherical. You also simplify the height calculation by assumi ing each layer is lappie diameter thick. Given the approximate apple diameter, the of the base, and the number of apples: How many layers of apples will fit on the display tabie wthout touching the sign? How many apples are keft over? How tal is the pyramid in inches andin number of layers)? Show test cases 0x16 base, max 10 layers, sign height 2 feet, 4000 apples are available, 432 base, max 13 layers, sign height 2 feet, 1200 apples are available

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Are my points each supported by at least two subpoints?

Answered: 1 week ago