Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started