Customer Service Chat
Get quote & make Payment
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
Ask an Expert
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
Write your message here..
Write a perl script that accepts two integer arguments, 1. Write a Perl scr...
1. Write a Perl script that accepts exactly 2 integer arguments where the first argument must be less than the second argument. The script will print a comma separated list of inte
Computes the least squares fit of the data, Your solution to the problem sh...
Your solution to the problem should be housed within a while loop, which allows the grader to test your solution repeatedly without having to re-execute the script, as shown in cla
Matlab exercices, can you do a matla assiengment
can you do a matla assiengment
shell script to check that a given number is prime or not, Normal 0 ...
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
Program for simulate part of the game of yahtzee, This assignment will make...
This assignment will make use of arrays and functions to simulate a game. ASSIGNMENT DESCRIPTION This program will simulate part of the game of Yahtzee! The player will
Linear time algorithm to find longest repeat prefix, A non-empty string β i...
A non-empty string β is called a repeat pre x of a string s if ββ is a pre x of s. Give a linear time algorithm to find the longest repeat prefix of s. Hint: Think of using lca
Java swing, Expertsmind brings you unique solution in java assignments ...
Expertsmind brings you unique solution in java assignments Swing Move is the primary Java GUI gadget tool set. It is part of Oracle's Java Groundwork Sessions (JFC) - an A
Programming, You must programme an analogue clock and digital stopwatch usi...
You must programme an analogue clock and digital stopwatch using the Processing programming language
Explain the booch methodology, Problem 1 Explain the Booch Methodology ...
Problem 1 Explain the Booch Methodology 2 Why does every interaction diagram need a written description? Explain 3 Explain the five core workflows of the Unified Process
econometrics using r, EF308 Assignment 2 Due: 3pm, 26 April 2012 Introduct...
EF308 Assignment 2 Due: 3pm, 26 April 2012 Introduction This assignment is loosely based on Cheung et al. (2005) and Molodtsova and Papell (2009) and examines the out-of- sample pr
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.