Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(1) Window Tinting Assume that you have a company that tints building windows. You have found a good price on nice gold tinting film that

(1) Window Tinting Assume that you have a company that tints building windows. You have found a good price on nice gold tinting film that comes in rolls that are 5 feet wide and 92 feet long. You want to write a program that determines the number of rolls that will be needed to be purchased to cover a building completely. Your program should assume that each window is the exact same size in the building and that the windows are always less than or equal to 5 feet wide. The program should ask the user for the number of floors in the building, the number of windows on each floor (includes all sides of the building) and the dimensions of the window (in inches). The program should then calculate the number of rolls needed. Note that when tinting a window, it must be done with one entire piece of film. That is, you CANNOT cut pieces of film to fit on the windows. You should determine whether the 5 foot width of tint roll is able to cover two or more windows. For example, if the windows are 12" x 24", then you can cover five windows with just two feet of roll but if placed sideways, you can only cover 4 windows, with a little waste left over (see picture below). You should choose the best option in this case. However, you must not apply any other packing/fitting algorithm for the purpose of marking consistency. Just choose which direction to put the tint on up and down or left to right. The program should output the correct number of tinting rolls that need to be purchased. Make sure to define appropriate constants in your code, as this represents proper coding style. Also, make sure to test adequately. (2) Scheduling Reservations Write a program called reservations.c that simulates some people trying to reserve seats at a restaurant for dinner. The program MUST work as follows: The restaurant takes reservations anywhere from 4pm until 9pm. That means someone can phone in and ask to reserve a table for a certain number of people starting at some specific time in the range of 4pm until 9pm. The people are allowed to stay past 9pm, but no more reservations can be made after 9pm. The restaurant can seat at most 80 people at any time, on any day of the week. Reservations may image text in transcribed

window Only 2 fit across 5 fit across with no wasted material Wasted material Optimal packing - do NOT do this. Tint roll window Only 2 fit across 5 fit across with no wasted material Wasted material Optimal packing - do NOT do this. Tint roll

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

Students also viewed these Databases questions