Question: Hello, I need help with this code in C++ using POO, thank u! Practice Book Exercise 1 Problem Statement The company Soluciones Inmobiliarias S.A. the
Hello, I need help with this code in C++ using POO, thank u!
Practice Book Exercise 1
Problem Statement The company Soluciones Inmobiliarias S.A. the construction of real estate developments and prompts you to develop a calculations application preliminary budgets for apartment buildings. In this exercise you are asked to develop a class hierarchy that allows you to determine the budget for a group of condominium-type buildings housing according to the characteristics listed below: 1. The class hierarchy is required to be made through composition objects, using "LISTS" to store the data of variable content as detailed in the following points. 2. Real estate is a building made up of N floors. (A list of floors). 3. Each floor in turn is made up of a total of M apartments (One list). 4. Each apartment has two dimensions: length, width, it does not occupy the high since the cost is given in square meter and the height is constant for all apartments on the same floor. 5. To calculate the costs, the effective area must first be determined for each floor and the total area of all floors. To the total area of each floor must add 35% of area which is the average value of space required for: corridors, entrances, stairs and elevators. 6. In the case of the building, it will be enough to know the total area per floor and add it to have the effective area per building. It must also be added to the total of apartments in each building an additional space of 24 meters squares corresponding to two parking spaces in a separate area intended for this purpose. The cost of the parking area is 75% of the cost of the square meter of construction. 7. The cost of the square meter is $ 350.00 are intended to build 3 buildings with the following characteristics: to. Building 1: i. Apartments floor 1 (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} ii. 2nd floor apartments (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} iii. 3rd floor apartments (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} Apt 13 {20,15} iv. 4th floor apartments (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} Apt 13 {20,15} b. Building 2: i. Apartments floor 1 (length and width) Apt 1 {12,15} Apt 2 {12,15} Apt 3 {12,15} Apt 4 {12,15} Apt 5 {12,15} Apt 6 {12,15} Apt 7 {12,15} Apt 8 {12,15} Apt 9 {12,15} Apt 10 {12,15} ii. 2nd floor apartments (length and width) Apt 1 {10,15} Apt 2 {10,15} Apt 3 {10,15} Apt 4 {10,15} Apt 5 {10,15} Apt 6 {10,15} Apt 7 {10,15} Apt 8 {10,15} Apt 9 {10,15} Apt 10 {10,15} Apt 11 {10,15} Apt 12 {10,15} iii. 2nd floor apartments (length and width) Apt 1 {10,15} Apt 2 {10,15} Apt 3 {10,15} Apt 4 {10,15} Apt 5 {10,15} Apt 6 {10,15} Apt 7 {10,15} Apt 8 {10,15} Apt 9 {10,15} Apt 10 {10,15} Apt 11 {10,15} Apt 12 {10,15} iv. Apartments floor 1 (length and width) Apt 1 {12,15} Apt 2 {12,15} Apt 3 {12,15} Apt 4 {12,15} Apt 5 {12,15} Apt 6 {12,15} Apt 7 {12,15} Apt 8 {12,15} Apt 9 {12,15} Apt 10 {12,15} c. Building 3: i. Apartments floor 1 (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} ii. 2nd floor apartments (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} iii. 3rd floor apartments (length and width) Apt 1 {20,15} Apt 2 {20,15} Apt 3 {20,15} Apt 4 {20,15} Apt 5 {20,15} Apt 6 {20,15} Apt 7 {20,15} Apt 8 {20,15} Apt 9 {20,15} Apt 10 {20,15} Apt 12 {20,15} Apt 13 {20,15}
Methodological construction of solution using classes. In order to facilitate development, the following recommendations are given: 1. Construct a type (typedef) called T_apartment that contains the dimensions of each apartment: length and width (float type). 2. Build the Floor class that contains: to. a private apartment list (can be the _queue structure view in class or use STL). b. The total floor area and the effective area (35% more than the effective). c. They must contain a method of insertion of each apartment in the list. d. A method that calculates the total area and the effective area and the store internally and. A method to return the effective area. F. A method to return the total area of the floor. g. A method that returns the total number of apartments in the list internal. 3. Build a Building class that contains: to. A private list of type Floor, in which each component contains each of the floors of point 2 (above). b. Attributes for the total area of the building and the effective area (a 35% more than the effective) of the entire building. c. They must contain an insert method of each floor in the list internal d. A method that calculates the effective end area for the values in the point 3.b. and. A method that calculates the total area (without 35%) for the values in point 3.b. F. A method that calculates the area of the land (taking as reference the area of the first floor of each building). 4. Develop a BaseHabitacional class with the following characteristics: to. A virtual method that calculates the total area of a complex of buildings (not present in this class). b. A virtual method that calculates the final cost of a complex of buildings (not present in this class). 5. Develop a Housing class with the following characteristics: to. Inherits the HabitatBase class publicly. b. It has a list of buildings that contains the elements of the point 3. c. A method that inserts a building into the list d. A protected method that calculates the total effective area and the cost of the complete construction (buildings and parking lots). and. A protected method that calculates the total area of a complex of buildings (polymorphism towards BaseHabitacional). F. A virtual method that calculates the final cost of a complex of buildings (polymorphism towards BaseHabitacional). 6. They must build a CPP and H file for each class stated. The Housing Base and Housing classes can go in a single pair of CPP and H. 7. They should make a main.cpp file that contains an evaluate function budget that receives in a referential way a BaseHabitacional object which calculates the area and the final costs. 8. In the main function (main) must be placed directly the values indicated for each length and width of each apartment. Do not use cin or scanf for the amount of data. 9. They must build the objects of classes / types: apartments, flats, buildings and housing, in addition to making the inclusions so that all the information remains in a Housing object that must be called Housing Complex. 10.Must do the calculation of total area and cost from the object Housing Complex, which must call each component of its list and in turn the contained objects must do the same in a have the cost and total area calculated from this call. 11. The function in the main to evaluate the cost (budget) and the total area you must call virtual functions to get the results requested as inherited functions are protected. 12.The code must be properly documented within the C ++ and H files so that the content is clear. If required, they must add a PDF file that details additional aspects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
