Following the UML diagrams you designed in 1., code the class.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question

1. Design a UML diagram to represent class called damConstruction, to implement the properties of a water dam construction. Your class should have the instance variables to store the length (in meters), width (in meters), depth (in meters), the rate (in litters per minute) at which the water is filling the dam, and the rate (in litters per minute) at which the water is draining from the dam. 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 dam; determine the time needed to completely or partially fill or empty the dam; add or drain water for a specific amount of time.

2. Following the UML diagrams you designed in 1., code the class.

3. Write a test program to test the class you coded in 2.

Please help me Awnser question 2. Please 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Software Development
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning