[SOLVED] CS150 Lab 22

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-22-qxpgzb.zip (406.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (4 votes)

Create a program that defines a class called circle. Circle should have a member
variable called radius that is used to store the radius of the circle. Circle should also
have a member method called calcArea that calculates the area of the circle using the formula area = pi*r^2. Area should NOT be stored in a
member variable of circle to avoid stale data.
Use the value 3.14 for PI.
For now, build everything in one file (main.cpp), make radius public and access radius directly using the dot operator. Do not worry about input validation for now. In main instantiate two objects of class circle and have the user enter a radius for each. Store the radii in the appropriate objects’ member variables, then print the radius and area of each circle using the member variable and function.

  • Lab-22-qxpgzb.zip