Question
C++ Help with a project from my book. So I just started a C++ class and before my first project, I decided to try some
C++ Help with a project from my book. So I just started a C++ class and before my first project, I decided to try some example projects from my book and I came across this one, which I am confused on how to do. Any help would be greatly appreciated.
Write the definition of a class, swimming pool, to implement the properties of a swimming pool.
Your class should have the instance variables to store the length (in feet), width (in feet), depth (in feet), the rate (in gallons per minute) at which the water is filling the pool, and the rate (in gallons per minute) at which the water is draining from the pool.
Add appropriate constructors to initialize the instance variables.
Also, add member functions to do the following: determine the amount of water needed to fill an empty or partially filled pool, determine the time needed to completely or partially fill or empty the pool, and add or drain water for a specific amount of time.
This program must have a main program that utilizes a header file that defines the class and an implementation file containing the constructions and functions used in the class definitions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started