Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How do I complete the coding and math for this problem? Explaining why each step is done would be a huge help as well! Problem

How do I complete the coding and math for this problem? Explaining why each step is done would be a huge help as well!image text in transcribed

Problem A: Reclungular Wedulinux Table Arrangements (table.c) One of the first jobs everyone hun when planning aweckling in picking il venue for the receptioni. In cering ser, many verues show their seating arrangements kur chinner is their clients. Depending on the dimensions of the tables and the distance between tables affects the number of people that can be scated. In this prollen. you'll analyze placing rectangular alles in a rectangular com. Given the relevant dimensions, your job will be to determine the maximum number of people that can be scated in the room (i.c., find the optimal arrangement). First, we assume that the room dimensions, length by width, are given, in feet. Next, we assume that cach table is identical in size, and those dimensions are also provided in feet. We are also given the number of feet of space required herween ench table and between ench table and wall. The last piece of information we neel is the number el peuple that can be selecl al ench Luble. Connicler the following situation: Room dimensions: 50' x 30' Table dimensions. 8' x 4 Space required: 3 People per table: 10 The picture is given on the following page. The labels on the left side of the diagram represent how far from the top of the room the beginning un uocant table is. Nuo 12 l iela 121 II w Wilo plavu OLI bols. We'd LILY Io skip three feet to 21 ind place the table. which would end it 28 feet. But the problem with this is that we'd only have two feet remaining from the end of this fourth table to the bottom wall. The labels on the buLLOIN of the diagra represent how far from the len wall the beginning and ending of each table is. It should be clear that a fifth table will not fit at the right end of the 10on. Thus, for this PIVO silim, 120 Lt (1) anu 12 e n 1 finne Input Specification 1. The room dimensions (in feet will ha insitive integere less than 1000. 2. The table dimensions (in lect) will be positive inters less than 1000. 3. The space required between tables and walls (in feel will be a positive integer loss than 10. 4. The people per table will be a poNirive integer in herween 3 and 20). inclusive. Output Specilin Output the total number of people the given seating arrangement can support with a statement in the followin2 toal. The uplimal arrangereril seals x peuple. where X is the number of people is cuestion Output Sample Below is a sample Qupul al rum i ERR Note that this Sample is NOT a comprehensive text. You should test your program with different cater than is shown here based on the specifications given above. In the sample un below, for cinrity and care of reading the user input is given in itaitos while the program output is in bold. (Note: When you run your program no bold or italies should app all 11. Those are ximply used in this description for clarily'sake.) Sample Run #1 What are the length and width of the room (in feet)? What are the length and width of each tabl. (in foot)? How much space is required between tables (in feet)? How many people does each table seat? The opt1mal seats 120 people. Sample Run #2 what are the length and width of the room (in feat)? What are the length and width of each table (in feet) ? How much space is required between tables (in feet) How many people does each table seat? The optimal arrangement seats 140 people

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 Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

Is it clear what happens if an employee violates the policy?

Answered: 1 week ago