Create a class, Ring, that is a subclass of Circle. Additional property is the inner radius of ring, ri Constructor function: 1. Ring will require two input arguments: the first input argument is the out radius, r, and second input argument is the inner radius, ri. Not that the out radius is defined in the properties of the Circle superclass. 2. If less than two input arguments are provided, set the outer radius to 1 and the inner radius to 1. Provide a statement that says "Dimensions are Missing." 3. If the out radius is less than the inner radius, set the outer radius to 1 and the outer radius to 1. Provide a statement that says "Dimensions are Incorrect." Methods: Create ringArea that will calculate the area of the ring.
Create a class, Ring, that is a subclass of Circle.
Additional property is the inner radius of ring, ri
Constructor function:
1. Ring will require two input arguments: the first input argument is the out radius, r, and second input argument is the inner radius, ri. Not that the out radius is defined in the properties of the Circle superclass.
2. If less than two input arguments are provided, set the outer radius to 1 and the inner radius to 1. Provide a statement that says "Dimensions are Missing."
3. If the out radius is less than the inner radius, set the outer radius to 1 and the outer radius to 1. Provide a statement that says "Dimensions are Incorrect."
Methods: Create ringArea that will calculate the area of the ring.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images