program 3, Computer Programming, Programming Languages

Assignment Help:
An apartment complex has several apartments to rent. The apartments are all similar, and all rent for $750 per month. Currently, all units are occupied. The management, being in business to make money, would like to raise the rent charged for the apartments. However, for each $40 increase in rent, one unit becomes vacant. Furthermore, each occupied unit costs $27 per month, on average, in maintenance costs. Raising the rent brings in more income from the occupied units, but also leads to fewer units being occupied. What is the level of rent that results in maximum profit?
Write a program that asks the user:
? how many units are in the complex;
? the rent at which all units are occupied;
? the increase in rent that results in a vacant unit; and
? the cost to maintain a rented unit.
Each of these quantities are whole numbers, but must be > 0. If necessary, ask the user repeatedly until numbers > 0 are entered.
The program should report the amount of rent that results in the highest profit, the number of units that are occupied at that rent level, and the income (minus maintenance costs) that is expected at that occupancy level.
This company manages several complexes; therefore, the program should allow the user to enter information for as many complexes as desired.
Hints & Tips:
? This program is about iteration (loops). Starting with the full occupancy rate, compute the profit (income minus maintenance), raising rent in steps, until the profit starts to drop.
? Do this in stages. For example, as soon as you have a program that computes the profit at full occupancy, turn it in via Blackboard. Then add the loop computing what happens as the rent increases—then turn that in. Finally, add the logic allowing the user to do this for several apartment complexes.
? You may find it helpful to use a separate variable to record the profit at the previous rent level, so you can compare it to the current profit to see how it’s changing.
A sample run is shown below. Note that the dollar signs on the input are part of the prompt, and are not part of what’s input by the user.

Related Discussions:- program 3, Computer Programming

We need advancement in existing phonegap application, We need Advancement i...

We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de

Program to explore page replacement algorithms, Objective: The purpose of ...

Objective: The purpose of this programming project is to explore page replacement algorithms. This can be accomplished by developing a simple simulator that implements various pag

Fortran programming, Question 1- In engineering applications it is often ne...

Question 1- In engineering applications it is often necessary to fit a straight line to a set of N points with known coordinates (xi, yi), where i indexes the points (N in total).

C-program, about how to create the program in c

about how to create the program in c

assembly lang. H.W, 1- Allocate array with 32bit 100 element 2- Prompt the...

1- Allocate array with 32bit 100 element 2- Prompt the user to enter the maximum or the upper bound of the random value 3- Read the value and use it generate random numbers to init

Program for average grades for 10 students, Assume that you are a college p...

Assume that you are a college professor needing to average grades for 10 students. Write a program that asks for each student's name and grade. Print the list on-screen with each s

Programming logic???, write c++ source code to find the number of digits i...

write c++ source code to find the number of digits in a given integer? pls ans

Write an implementation for the prime machine, You should use the BToolkit ...

You should use the BToolkit to produce the answers to the questions below. Where applicable, please use the machine names and identifier names suggested in the question to help me

Create xml document to save calendar information, Prepare an XML document t...

Prepare an XML document that contains calendar information such as the following text describes: The calendar is owned by a person (e.g. John Smith) and has a few paragraphs tha

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd