Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 (40 marks) Part A (20 marks) Write a program defines a class for a circle that will have member functions that set the

image text in transcribed

Question 4 (40 marks) Part A (20 marks) Write a program defines a class for a circle that will have member functions that set the center, find the area, find the circumference and display these attributes based on the main() function as follows: const int SIZE = 3; const double PI = 3.14; int main() Circles circle[SIZE] = {Circles (5, 1, 1), 4); for (int i=0; i return 0; 1 ASSIGNMENT 2 (SEMESTER I 2020/2021) EECE 1313 PROGRAMMING FOR ENGINEERS DR NADIRAH BINTI ABDUL RAHIM Your program should have the following structure: a class called Circles that contains information (only for data members radius, center x and center y) presented in private (6 marks) a default constructor to initialize every data member. (2 marks) a constructor with 1 parameter (2 marks) a constructor with 3 parameters (2 marks) a member function called find Area(...) to calculate the area of circle. (2 marks) a member function called find Circumference(...) to calculate the circumference of circle (2 marks) a member function called printCircleStats(...) that will display the radius and the centre of the circle. (2 marks) a destructor to release the dynamic memory allocated by constructor (2 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions