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

Write a program to read the file, Suppose you have a ?le orase of city and ...

Suppose you have a ?le orase of city and country names, like this: Cluj, Romania Debrecen, Hungary Klagenfurt, Austria Berlin, Germany Szeged, Hungary Budapest, Hungary Lintz, A

Computer programming on human algorithm, 1.   You have been asked to write ...

1.   You have been asked to write a computer program that will figure out the total of an order when given the amount of the order ($200) and a sales tax rate of five percent.  I w

Amazon login, I want to set up automatic Amazon login

I want to set up automatic Amazon login

Program to present main frame contains of button, The program presents main...

The program presents mainframe contains two button new user, existing user PART ONE: CLICKING ON NEW USER New window appear contains: text field represent username,

Arithmetic involving matrices, We next require taking a look at arithmetic ...

We next require taking a look at arithmetic involving matrices. We'll begin with addition and subtraction of two matrices. Therefore, assume that we have two n x m matrices, which

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

Visual basic.net, how to create a screen for messages for a data transmissi...

how to create a screen for messages for a data transmission system

Exception Handling in c++, Exception handling Exception handling is a mech...

Exception handling Exception handling is a mechanism that separates code that detects and handles exceptional circumstances from the rest of your program. Note that an exceptional

Information management system, Write a detailed description on how you woul...

Write a detailed description on how you would go about planning information system for an organisation

Shell script, program for pyramid in shell script

program for pyramid in shell script

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