An estate agency sells and rents out properties. Each property listed at the company has a property code and is assigned to an estate agent. The property code consists of 10 digits e.g. 1312122019. The first digit indicates whether the property is for sale (1) or available for renting (2). The second digit indicates whether it is a business property (> 2) or a residential property (<= 2). Properties that are for sale has a selling price while properties to be rented out has a rent amount (per month) and a value that indicates the duration of the contract (in number of months). Example data: Properties for sale Code Agent Selling price 1312122019 Matt 550000.00 1243022019 Lizzy 670000.00 Properties for rent Code Agent Rent pm Duration 2343052019 Julia 9500.00 12 2871112019 Dave 11000.00 6 The estate agency requires an application to do the following: • Calculate the total amount to be paid by either the buyer or the tenant. For properties that are for sale a tax amount is added to the selling price. The tax is calculated as follows: Less than R500000.00: no tax R500000.00 - R1000000.00: 10% of selling price More than R1000000.00: 15% of selling price If the property is rented out the total amount that the tenant has to pay is calculated by multiplying the monthly rent amount with the number of months that the property is to be rented. Calculate the commission earned. For properties sold the commission is calculated as a percentage of the total amount paid (including tax). The percentage earned as commission must be received as a parameter value. If the property is rented out the commission is calculated as a percentage (received as parameter) of monthly rent. If it is a business property a value of 2.5 is added to the percentage received as parameter.
An estate agency sells and rents out properties. Each property listed at the company has a property code and is assigned to an estate agent. The property code consists of 10 digits e.g. 1312122019. The first digit indicates whether the property is for sale (1) or available for renting (2). The second digit indicates whether it is a business property (> 2) or a residential property (<= 2). Properties that are for sale has a selling price while properties to be rented out has a rent amount (per month) and a value that indicates the duration of the contract (in number of months).
Example data:
Properties for sale
Code Agent Selling price
1312122019 Matt 550000.00
1243022019 Lizzy 670000.00
Properties for rent
Code Agent Rent pm Duration
2343052019 Julia 9500.00 12
2871112019 Dave 11000.00 6
The estate agency requires an application to do the following: • Calculate the total amount to be paid by either the buyer or the tenant. For properties that are for sale a tax amount is added to the selling price. The tax is calculated as follows: Less than R500000.00: no tax R500000.00 - R1000000.00: 10% of selling price More than R1000000.00: 15% of selling price If the property is rented out the total amount that the tenant has to pay is calculated by multiplying the monthly rent amount with the number of months that the property is to be rented.
Calculate the commission earned. For properties sold the commission is calculated as a percentage of the total amount paid (including tax). The percentage earned as commission must be received as a parameter value. If the property is rented out the commission is calculated as a percentage (received as parameter) of monthly rent. If it is a business property a value of 2.5 is added to the percentage received as parameter.
Step by step
Solved in 3 steps with 2 images