Question: CIS 260 Lab 9 For this lab, you will be creating a Circle class and will create four methods: a default constructor for this class,

 CIS 260 Lab 9 For this lab, you will be creating

CIS 260 Lab 9 For this lab, you will be creating a Circle class and will create four methods: a default constructor for this class, a parameterized constructor, a method called GetPerimeter) that returns a double representing the circle's perimeter, and a method called GetArea() that returns a double representing the circle's area. If the default constructor is used, its radius will be automatically set to 1. You will also be creating another class called Lab9 that will contain your main method. In the main method, you should create at least two different circles and print out each circle's radius and area. Make sure at least one circle uses the default constructor and at least another circle uses the parameterized constructor Use information hiding in the Circle class. Additionally, make sure that both the Circle.java and Lab9 java files are located in the same directory. Otherwise, the code may not be able to run. Some starter code has been provided for you. Sample Output Area: 3.141592653589793 Perimeter: 6.283185307179586 Area: 314-1592653589793 Perimeter: 62.83185307179586 15

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