program 3, Computer Programming, Programming Languages

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.
Posted Date: 1/30/2012 6:10:19 PM | Location : United States







Related Discussions:- program 3, Computer Programming, Assignment Help, Ask Question on program 3, Computer Programming, Get Answer, Expert's Help, program 3, Computer Programming Discussions

Write discussion on program 3, Computer Programming
Your posts are moderated
Related Questions
Define Functions with no arguments and no return values? When a function has no arguments it doesn't receive any data from the calling function. Likewise, it doesn't return any

In this assignment, you will design a program to perform the following task: Calculate the total price to purchase all the components required to build a state-of-the-art gaming c

1 Problem Description The task of the assignment is to build a book recommendation system for Auer Libraries. The system is to be implemented in Prolog and as the owners of t

Python Programming hmw help!! Write a program that ask the user to input the followings: number of shares, stock price, and broker commission. Last month jim purchased some stock

While working in the eHealth Applied Research lab at Mohawk College, you are asked to transform an xml file into an XHTML representationusing XSLT for display in a browser.The xml

1) Write a program that takes an input value (for example, a number 5). The output should be sum of all numbers from 1 to the value input by the user (in this example, the output w

Define Reasons for using Functions? 1. Evade rewriting the same code over and over. 2. It is simpler to write programs and keep track of what they are doing. Codes are able t

program take integer from user and print in alphabets

Expertsmind brings you unique solution in java assignments Event Delegation Model The Delegation Model with java assignment help Version 1.1 of the Java TM foundation

i have to make a program that encrypt a text to numbers, i don''t know what is wrong in my code, the example of what i need: text: hi >> number: 17 23