Make a C++ program with class, object, constructor, data member with access modifier and member function overloading. FileName: Data.cpp The program must have the following data members and formula. All data members are private. Data Member Formula area3 cube (initial value is Zero) cylinder (initial value is Zero) rectangle (initial value is Zero) sphere (initial value is Zero) |(pi)r²h Lwh 4(pi)r3 3 pi (value is 3.1416) None The C++ program have the fix main() function. int main (){ Formula shape; shape.compute (20);//for cube - shape.compute (12.75, 10);//for cylinder - one fractional and one whole number shape.compute (5, 7, 15);//for rectangle - three whole number shape.compute (25.50);//for sphere - one fractional number one whole number Expected Output: The
Make a C++ program with class, object, constructor, data member with access modifier and member function overloading. FileName: Data.cpp The program must have the following data members and formula. All data members are private. Data Member Formula area3 cube (initial value is Zero) cylinder (initial value is Zero) rectangle (initial value is Zero) sphere (initial value is Zero) |(pi)r²h Lwh 4(pi)r3 3 pi (value is 3.1416) None The C++ program have the fix main() function. int main (){ Formula shape; shape.compute (20);//for cube - shape.compute (12.75, 10);//for cylinder - one fractional and one whole number shape.compute (5, 7, 15);//for rectangle - three whole number shape.compute (25.50);//for sphere - one fractional number one whole number Expected Output: The
Principles of Information Systems (MindTap Course List)
12th Edition
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter6: Telecommunications And Networks
Section: Chapter Questions
Problem 5SAT
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning