Question: (In Matlab) Create a base class named Point that has the properties for x and y coordinates. From this class derive a class named Circle
(In Matlab) Create a base class named Point that has the properties for x and y coordinates. From this class derive a class named Circle having an additional property named radius. For this derived class, the x and y properties represent the center coordinates of a circle. The methods of the base class should consist of a constructor, an area function that returns 0, and a distance function that returns the distance between two points. The derived class should have construtor and an overloaded function named area that returns the area of a circle. Write a script that has two objects of each class and calls all of the methods.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
