Question: Please use C++ to solve this problem. thx! Objective: The main objective of this assignment is checking the students ability to work with ADTs. In

Please use C++ to solve this problem. thx!

Objective: The main objective of this assignment is checking the students ability to work with ADTs. In this week's assignment, you will be writing the interface of an ADT in order to conform to the requirements of a larger application. Description: Multi-Level-Marketing is a quickly growing industry in the United States. Many men and women are deciding to work from home, selling various goods to their friends and family due to the convenience and possible salary that can be made. Multi-Level-Marketing consists of a hierarchy of workers and customers and is sometimes referred to as a pyramid scheme. At the bottom of the chain is the customer who purchases a good or service from a salesman. Above a salesman, there is always a regional salesman/manager who is supplying and managing these bottom level salesmen. Suppose a company that employs a multi-level-marketing strategy is not doing very well and needs to make cuts. After examining the budget, upper level management has realized that some poorly performing salesmen actually cost more to insure than they make for the company. Therefore, upper level management has decided that the lowest performing salesman of each regional manager should be fired. Any fired salesmens customers should be distributed to the rest of the salesmen as evenly as possible. Unfortunately, this company does not have a very robust filing system and needs a way to automatically calculate who needs to be fired. They ask you to create an automated system that given a text file of the workers and customers information can automatically detect who should be fired and which salesmen will get left over customers. Given the customer and worker information, you are required to print the hierarchy of this region to the screen before and after the firing. Input File: The input file you are given first lists the information of the regional manager consisting of an ID, a name, and a salary. Your program is required to store this information and provide ways to manipulate this information properly. For this assignment, a manager always has 5 salesmen working for them. The next item to extract from the file is a salesmens information. A salesman has an ID, a name, a gender, and an indication of how many customers they have. After a salesmans information comes the information of all the customers that this worker is selling to. For example, if a salesman sells to two customers, the next two entries will be customer information (here an entry begins and ends with a blank line). A customers only information is a name and a total amount of money they have spent. This same pattern is repeated until all 5 salesmen and their customers are printed. Help: The best start, for this assignment, is identifying (naming) the ADTs this is the most critical step. Good decisions (choices) naming the ADTs facilitate the implementation. Please spend enough time thinking about the possible names of the ADTs, which you can use to implement this assignment. The names of these ADTs should be very obvious from the description above. Example output: The way that you print out the hierarchy of the region is left up to you. If the information is easy to read and understand, you will get full credit. Be sure to print out the region hierarchy before and after a salesman is fired. Here is an example

input file:

1039547 Jabob Smith 120000

1033547 Gwenn Mccloy Male 2

Hildegard Rutz 39.46

Lydia Feng 58.21

1478021 Hildegard Rutz Female 1

Noreen Encarnacion 1.23

1098576 Deirdre Stayer Female 4

Wade Peffer 5.24

Ronda Ord 89.99

Lacresha Lawrence 22.54

Zackary Schiro 19.95

122354 Deirdre Stayer Female 1

Marcus Curl 2.22

187213 Tyesha Overton Male 2

Celine Mccutchan 52.29

Debra Widger 2.55

Please use C++ to solve this problem. thx! Objective: The main objective

anager Jabob Smith 120000 SalesPerson: Gwenn Mccloy 1033547 97.67 Customer Customer Hildegard Rutz Lydia Feng 39.46 58.21 SalesPerson: Hildegard Rutz 1478021 1.23 Customer Noreen Encarnacion SalesPerson: Deirdre Stayer 1098576 137.72 Customer: Customer: Customer Customer Wade Peffer Ronda Ord Lacresha Lawrence Zackary Schiro 89.99 22.54 19.95 SalesPerson: Deirdre Stayer 122354 Customer Marcus Curl SalesPerson: Tyesha Overton 187213 54.84 Customer: Customer: Celine Mccutchan Debra Widger 52.29 anager Jabob Smith 120000 SalesPerson: Gwenn Mccloy 1033547 9767 Customer: Customer: Customer: Hildegard Rutz Lydia Feng Noreen Encarnacion 39.46 SalesPerson: Deirdre Stayer 1098576 137.72 5.24 89.99 Customer: Customer Customer Customer Wade Peffer Ronda Ord Lacresha Lawrence Zackary Schiro 22.54 19.95 SalesPerson: Deirdre Stayer 122354 Customer: MarcusCurl SalesPerson: Tyesha Overton 187213 54.84 Customer: Customer: Celine Mccutchan Debra Widger 52.29 rocess returned (0x0 execution time0.031 s ress any key to continue

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!