Write a program that calculates the area and keeps a count that how many times it has
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a program that calculates the area and keeps a count that how many times it has calculated the area.
1. Create a class area that has data members of length, width, and area (int type).
2. It also has a static int member count, initialize it with zero.
3. Overload constructor of class and calculate area in it, pass the values of length and width from main. (calculate the area three times).
4. Create a static member function in class which tells that how many times area has been calculated. (This function will return the value of count when called)
5. Write the function of display and display the area along with the value of count.
C++ OOP
Kindly use double pointers.
Related Book For
An Introduction to the Mathematics of Financial Derivatives
ISBN: 978-0123846822
3rd edition
Authors: Ali Hirsa, Salih N. Neftci
Posted Date: