Question: b ) . In a working C + + program. Create a base class named Point consisting of x and y data members representing point

b). In a working C++ program. Create a base class named Point consisting of x and y data
members representing point coordinates. From this class, derive a class named Circle with
another data member named radius. For this derived class, the x and y data members
represent the circle's center coordinates. The member functions of the Point class should
consist of a constructor, an area() function that returns 0, and a distance() function that
returns the distance between two points, (x,y) and (x2,y2), where
distance =(x2-x1)2+(y2-y1)2
Additionally, the derived class should have a constructor and an override function named
area() that returns a circle's area.
Have your prograin call all the member functions in each class. In addition, call the base
class's distance() function with two Circle objects and explain the result this function
returns.
(15 marks)
25 marks
b ) . In a working C + + program. Create a base

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