Question: can you explain 8,9,10 breifly ? this code is an object oriented programming and written in c++ but i want the explantion of question 8

can you explain 8,9,10
breifly ?
this code is an object oriented programming and written in c++ but i want the explantion of question 8 , 9 and 10  can you explain 8,9,10 breifly ? this code is an object

Question 6: [10 points] In the main function: 1) create a const Driver_Rental_Car object with any prober values and name it drc 2) declare a pointer of type Rental_Car and call it rcptr 3) create a Driver_Rental_Car object dynamically with any prober values and make the pointer reptr points to it. 4) call printData using reptr, would this call the function in Rental_Car class or in Driver_Rental_Car class. 5) call calculate_cost using reptr, would this call the function in Renta__Car class or in Driver_Rental_Car class? 6) call the overloaded operator function to test if the object pointed to by reptr has a greater rental cost than the object drc or not. 7) free the memory pointed to by the pointer rcptr 8) if we have the class Company_Rental_Car, which inherits class Rental_Car, can we use the pointer reptr to point to the object crc of type Company_Rental_Car after implementing (7)? Briefly explain your answer. 9) Can we pass the object crc from (8) as an argument to the function operator of class Driver_Rental_Car? Briefly explain your answer. 10) is the following declaration correct in the main function? explain your answer. Rental_Car rentalCar1

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!