Question: i want the full c++ code and files and everything please help Put all the following in a file called polymorphism.cpp: Define a struct called

i want the full c++ code and files and everything please help
i want the full c++ code and files and everything please help

Put all the following in a file called polymorphism.cpp: Define a struct called point with components Coordinate and Coordinate of type integer Define a class called shape without any member. Define a class called triangle, which publicly inherits shape and has the three data members first, second, and third of type point. Define a class called square, which publicly inherits shape and has the two data members first and second of type point Define a class called rectangle, which publicly inherits shape and has the two data members first and second of type point Each of the three classes triangle, square, and rectangle has the following member functions void it void draw const The function setfint h) of triangle is the values (6th, 12). (2*, 12) and ( 96) to fast, second and third respectively, while the function de ploes the triangle The function serint b) of square in the values 6h, 11) (126) o first, and cond respectively, while the functie dra plats the square The function sekin) of rectangle is the whith, 12). and first and second respectively, while the function du ploes the rectangle Write a driver that does the following Declare way of pointers of type shape and shapes Declare the objects tria, pect of type triangle square, and rectangle respectively Makecach pointer points to ce of the objects Repeat the following for to 20tim Generate a random in which is 01.02 Call the system function Sleep(500) Call the function in Make the pointer the function, where Make the pointer invoke the functie Implement the womber functions for each What modification you need to do the class shape . . . Hit The function ay) moves to conto the posts wood vody HANDLE SCO COORD Position COLO dw.com de uc GOSTD OUTPUT HANDLE Sa clutchai 1

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 Accounting Questions!