Question: Write a program using COBOL to compute the profit or loss on apartment buildings. Example input: RENT.TXT B152042509350012425509186542 Columns: 1 3 The apartment building identification

Write a program using COBOL to compute the profit or loss on apartment buildings.

Example input: RENT.TXT

B152042509350012425509186542

Columns: 1 3 The apartment building identification number

4 5 The number of rental units in the building

6 8 The monthly rent per unit

9 14 The annual revenue received from the building

15 20 The annual cost of heating the building

(9999v99 two places to the right of the decimal)

21 - 28 The interest payments made on a mortgage on the

building (9999v99)

Output example:

Revenue Statement 2017

Dr. Petes Apartments Inc

Apt. Units Rental Annual Annual Annual Occupancy Gross

Bdg. Rate Revenue Heating Interest Rate (%) Profit(+)

Monthly Cost Lost(-)

B15 20 425 $93,500 $1,242.55 $91,865.42 91.67 $ 392.03+

Total Profit or Loss $???,???.??

In the output file, the occupancy rate is computed from the annual revenue as a percentage of the theoretically possible annual revenue from rents, that is, number of units times monthly rental times 12. The gross profit is the revenue less heating cost less interest payments. All dollar values must be formatted as above. Your output heading must include your name, assignment number and due date. Compute and print the total profit or loss for all the apartments.

When computing a value that may be negative you need a picture with the S

i.e. 05 profit-loss pic s99999v99.

And

i.e. 05 profit-loss-out pic +$999,999.99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!