The values you generate should be floating points and allow


Create a pogram that uses inheritance. You will have a base class called Polygon which contains width and height. There will be two classes that inherit from this base class-rectangle and triangle. These two classes will have two member functions-1) calculate area and 2) show area. The base case will be able to show width and height. Remember to have constructors for the classes. Use the rand() function to generate the values for length and width. Have the values be between 1 and 10 to represent inches. The values you generate should be floating points and allow for decimal points. to perform this task you should generate random numbers between 200 and 1000 and then divide by 100 to generate the decimal points.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The values you generate should be floating points and allow
Reference No:- TGS0646402

Expected delivery within 24 Hours