Question 1: Lesotho House of Brokers (LHB) is an organization responsible for keeping track of all brokers nationwide. A broker acts as a middle man between a buyer and a seller; a buyer communicates with a broker for arrangements of trade with the seller. LHB only works with brokers involved in the trading of houses and sites. The organization ensures that brokers follow certain rules to stay in business. All brokers, sellers, sites, houses and buyers must be registered in the system. The system will then maintain information about the following data items, broker, seller, buyer, site and house. Broker has the following attributes: ● Br code, BR name, Maximum sale made, list of items sold and Number of items sold . Seller has the following attributes: ● Registration number, Name, List of items sold and Accumulative monthly sale. Buyer has the following attributes: ● Registration number, Name, List of items bought, Accumulative monthly purchases and Accumulative discount. Site has the following attributes: ● Property code, Description, Type, Price. House has the following attributes: ● Property code, Description, Type, Price. A broker is identified by the Br code. Each broker is allowed to make a maximum of 20 sales per month. Monthly sales of all brokers are stored in the following format. The table below assumes that we have 2 brokers. The first broker has Br code of 0001 and has made six sales, the second broker has Br code of 0002 and has made three sales, the third broker has Br code of 0003 and has made one sale and the fourth broker has Br code of 0004 and has made four sales. 0001 Site1 Site2 House1 House2 House3 Site3 0002 House1 Site1 House2 0003 Site1 0004 Site1 Site2 House1 Site3 N.B: Remember that the table above is just for visualization, you will need to store sites and houses using their attributes. A list of buyers, sellers and brokers will be maintained. Subsequently, a list of items bought and sold should also be maintained for sellers and buyers. The accumulative monthly sales and purchases will be computed as the sum of all prices on the list of items on sellers and buyers respectively. The accumulative discount for a buyer is 1.2% of their accumulative monthly purchases. N.B make the list buyers, sellers and brokers global so that they are accumulative and accessible. The types of sites offered are either residential sites or commercial sites while houses are family houses, mansion houses or apartment houses. You are requested to develop a C++ menu driven application to keep track of all data items for LHB. When your app starts, it must display a list of all possible operations one can perform. This list should always be in display no matter what operation is being carried out. Create a user defined data types to cater for the data items above. PLEASE DO NOT USE CLASSES. ............................................................................................................................................................... Write the following functions and incorporate them into the app: ● Write functions that receives brokers, sellers and buyers into their accumulative lists into the app. .................................................................................................................................................. ● A template function that receives details of sites and houses into the app. Make sure to update monthly sales for all brokers accumulatively as sites and houses are inserted. ................................................................................................................................................... ● A function that searches for the highest maximum sale made amongst all brokers. The maximum sale made for each broker is computed automatically as the list of items sold accumulates. ................................................................................................................................................... ● A function that displays the registration number and name of both seller and the buyer for a certain site or house. hint: properties are identified by the property code. ................................................................................................................................................... ● A function that allows swapping of descriptions for two properties. .................................................................................................................................................... ● A function that lists all properties by the property code and type and price, ordered in descending order by price. ............................................................................... The user should also have an option for creating a monthly report. The monthly report is given as a text file. The text file contains all information about the brokers, buyers, sellers, sites and houses. Name your report report.txt.
Question 1: Lesotho House of Brokers (LHB) is an organization responsible for keeping track of all
brokers nationwide. A broker acts as a middle man between a buyer and a seller; a buyer
communicates with a broker for arrangements of trade with the seller. LHB only works with brokers
involved in the trading of houses and sites. The organization ensures that brokers follow certain rules
to stay in business. All brokers, sellers, sites, houses and buyers must be registered in the system. The
system will then maintain information about the following data items, broker, seller, buyer, site and
house.
Broker has the following attributes:
● Br code, BR name, Maximum sale made, list of items sold and Number of items sold .
Seller has the following attributes:
● Registration number, Name, List of items sold and Accumulative monthly sale.
Buyer has the following attributes:
● Registration number, Name, List of items bought, Accumulative monthly purchases and
Accumulative discount.
Site has the following attributes:
● Property code, Description, Type, Price.
House has the following attributes:
● Property code, Description, Type, Price.
A broker is identified by the Br code. Each broker is allowed to make a maximum of 20 sales per
month. Monthly sales of all brokers are stored in the following format. The table below assumes that
we have 2 brokers. The first broker has Br code of 0001 and has made six sales, the second broker has
Br code of 0002 and has made three sales, the third broker has Br code of 0003 and has made one sale
and the fourth broker has Br code of 0004 and has made four sales.
0001 | Site1 | Site2 | House1 | House2 | House3 | Site3 |
0002 | House1 | Site1 | House2 | |||
0003 | Site1 | |||||
0004 | Site1 | Site2 | House1 | Site3 |
N.B: Remember that the table above is just for visualization, you will need to store sites and
houses using their attributes.
A list of buyers, sellers and brokers will be maintained. Subsequently, a list of items bought and sold
should also be maintained for sellers and buyers. The accumulative monthly sales and purchases will
be computed as the sum of all prices on the list of items on sellers and buyers respectively. The
accumulative discount for a buyer is 1.2% of their accumulative monthly purchases.
N.B make the list buyers, sellers and brokers global so that they are accumulative and accessible.
The types of sites offered are either residential sites or commercial sites while houses are family
houses, mansion houses or apartment houses.
You are requested to develop a C++ menu driven application to keep track of all data items for LHB.
When your app starts, it must display a list of all possible operations one can perform. This list should
always be in display no matter what operation is being carried out. Create a user defined data types to
cater for the data items above. PLEASE DO NOT USE CLASSES.
...............................................................................................................................................................
Write the following functions and incorporate them into the app:
● Write functions that receives brokers, sellers and buyers into their accumulative lists into the
app.
..................................................................................................................................................
● A template function that receives details of sites and houses into the app. Make sure to
update monthly sales for all brokers accumulatively as sites and houses are inserted.
...................................................................................................................................................
● A function that searches for the highest maximum sale made amongst all brokers. The
maximum sale made for each broker is computed automatically as the list of items sold
accumulates.
...................................................................................................................................................
● A function that displays the registration number and name of both seller and the buyer for a
certain site or house. hint: properties are identified by the property code.
...................................................................................................................................................
● A function that allows swapping of descriptions for two properties.
....................................................................................................................................................
● A function that lists all properties by the property code and type and price, ordered in
descending order by price.
...............................................................................
The user should also have an option for creating a monthly report. The monthly report is given as a
text file. The text file contains all information about the brokers, buyers, sellers, sites and houses.
Name your report report.txt.
...
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 6 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)