Question: using c++ Building Person carExp Car 4) Write the header on (carExp.h) file and the implementation on (carExpImp.cpp) file of the new class carExp which

 using c++ Building Person carExp Car 4) Write the header on using c++

Building Person carExp Car 4) Write the header on (carExp.h) file and the implementation on (carExpImp.cpp) file of the new class carExp which publically inherits the properties of the Building class with the following additional members as shown in the below UML class diagram. carExp -name: string -maxNumOfCars int -numofCars: int -c*: Car + owner: Person + carExp (string, int, double, string, string, int, char, string, int) + carExp (carExpl) + -carExp() + getMaxNumofCars(): int + get NumofCars(): int + isFull(): bool + isEmpty(): bool + insertCar(string, string, int, double): void + printAllCars():void + allCarsPrices(): double + searchCarPrice (double): void + printInfo() : void Functions Description for carExp: 1) A constructor that takes 9 parameters and sets them to the following members: the address, the numOfFloors and the area for the building, the name, the nationality, the age and the gender for the owner and the name and the maxNumOfCars for the car exhibition. Also, it sets the numOfCars to zero (length). Then, builds a dynamic array of size maxNumOfCars of type Car by using the c pointer. 2) carExp(carExp &).a copy constructor to avoid shallow copying 3) -carExp0: Destructor will delete the dynamic array and print the following statement "The car exhibition is closed". 4) getMaxNumOfCars(): return the maximum number of cars in the exhibition. 5) getNumOfCars(): return the number of cars in the c array. Car 6) isEmpty(: return true if the car list has no elements else return false 7) isFull():return true if the car list is full else return false 8) insert(string.string.int.double): a void function that inserts a new car to the list. (Remember that you can't insert if the car list is full). 9) printAllCars(): a void function to print all information about the car with the following format. Type Color Year Price Toyota 2010 BMW Black Silver Red 2012 13000JD 30000JD 50000JD Ferrari 2011 Building Person carExp Car 4) Write the header on (carExp.h) file and the implementation on (carExpImp.cpp) file of the new class carExp which publically inherits the properties of the Building class with the following additional members as shown in the below UML class diagram. carExp -name: string -maxNumOfCars int -numofCars: int -c*: Car + owner: Person + carExp (string, int, double, string, string, int, char, string, int) + carExp (carExpl) + -carExp() + getMaxNumofCars(): int + get NumofCars(): int + isFull(): bool + isEmpty(): bool + insertCar(string, string, int, double): void + printAllCars():void + allCarsPrices(): double + searchCarPrice (double): void + printInfo() : void Functions Description for carExp: 1) A constructor that takes 9 parameters and sets them to the following members: the address, the numOfFloors and the area for the building, the name, the nationality, the age and the gender for the owner and the name and the maxNumOfCars for the car exhibition. Also, it sets the numOfCars to zero (length). Then, builds a dynamic array of size maxNumOfCars of type Car by using the c pointer. 2) carExp(carExp &).a copy constructor to avoid shallow copying 3) -carExp0: Destructor will delete the dynamic array and print the following statement "The car exhibition is closed". 4) getMaxNumOfCars(): return the maximum number of cars in the exhibition. 5) getNumOfCars(): return the number of cars in the c array. Car 6) isEmpty(: return true if the car list has no elements else return false 7) isFull():return true if the car list is full else return false 8) insert(string.string.int.double): a void function that inserts a new car to the list. (Remember that you can't insert if the car list is full). 9) printAllCars(): a void function to print all information about the car with the following format. Type Color Year Price Toyota 2010 BMW Black Silver Red 2012 13000JD 30000JD 50000JD Ferrari 2011

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!