Question: ( b ) [ 1 2 Points ] Ellipse class: Create a derived class representing a ellipse. [ - ] two private ints ( to
b
Points Ellipse class: Create a derived class representing a ellipse.
two private ints to designate the width and height of the object
implement a single constructor that, if called with arguments, initializes a unit Rectangle at the origin and width height but if called with four arguments x y w h creates a Rectangle located at x y with width heightw hHint: You will need to use default arguments.
Support the following operations using the given function signatures:
Get width, Get height, Set width, Set height
implement draw Shape function for Rectangle.
implement area function for Rectangle that returns the area of the object.
c Points Circle class: Create a derived class representing a circle.
one private ints to designate the radius of the circle
implement a single constructor that, if called with arguments, initializes a unit Circle at the origin and radius but if called with three arguments x yr creates a Circle located at x y with radiusr
Support the following operations using the given function signatures:
Get radius, Set radius
implement draw Shape function for Circle
implement area function for Circle that return the area of the object.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
