Starting from:

$29

Homework #6 – Class and instances of classes

EGRE 246 Advanced Engineering Programming Using
C++
Homework #6 – Class and instances of classes
This homework must be your own (individual) work as defined in the course syllabus and
discussed in class.
For this homework you will have to implement a “circle” class. You are given a main
source file and the circle class definition file. The following members are part of the
“circle” class.
radius: radius of the circle
circle(): default constructor
circle(float r): constructor which will set the radius
circle(const circle &obj): copy constructor
void setRadius(float): method for setting radius
float getRadius(void): Returns radius of circle
float getArea(void): Returns area of circle
float getCircumference(void): Returns circumference of circle
Once you have implemented the circle class and all of its methods, the output of the main
function should look like
The main and the circle class definition files should NOT be altered.
For this homework, submit a zip file with the class definition (circle.h) file, your class
implementation (circle.cpp) file, and the main function file. Be sure to include a Makefile
that compiles your solution.

More products