write a C++ program to implement the properties (private variables) and behavior (public methods) of the three different tanks. In your program, you must use three different classes, one for each tank type. Your class should have some instance variables t

computer science

Description

write a C++ program to implement the properties (private variables) and behavior (public methods) of the three different tanks. In your program, you must use three different classes, one for each tank type. Your class should have some instance variables to store the tank’s dimension measured in feet. The initial values are given in parentheses. First set of ADTs In case of cuboidal tanks class: these are length (10), width (6) and height (400) and the liquidHeight (initially 0). You may add other properties you see necessary. In case of cylindrical tank class: these are base radius (6) and height (400) and the liquidHeight (initially 0). You may add other properties you see necessary. In case of the regular right hexagonal prism class: these are base edge (6) and height (400) and the liquidHeight (initially 0). You may add other properties you see necessary. You must use member functions of the appropriate class to help the company to: 1. To get the maximum possible volume 2. To get the current volume 3. To supply oil (change liquidHeight) 4. To get the amount of oil to completely fill tank (max possible volume - current volume) 5. To get the amount of oil to partially fill tank (new volume - current volume) Second set of ADTs The second set of ADTs you have to implement are: an Operator (class) ADT and a main function to test all the ADTs. The Operator ADT should consist of a struct to represent operator details which are: ID (a nine digit number) first name last name employment date (a date of form MM:DD:YYYY - must be represented by a struct) role (a single character) All the operators data are provided in a file: operators.txt. Each line in the file represents an operator record. The first line in the file states the number of records. The Operator member function should provide the following capabilities: 1. To print all operators 2. To print only operators with a given role character 3. To print only operators with a given employment year 4. To print only operators with a given employment month 5. To print only operators with a given employment day The main function should provide a menu to test all the capabilities. The main menu provides 2 submenu - Manager and Operator Menu: The Manager menu provides access to the Operator operations: The Operator menu provides access to the selecting what Tank operation: Each tank item provides access to the Tank operations (get max possible volume, etc). The example below targets the CuboidalTank. Each tank has the same set of operations (internally, they implement different volume formulae). Note: 1. Your menus must replicate those seen above and in the sample program (main.exe) provided. 2. Feel free to use as many membership functions, private variable, public functions as you see fit. But you must provide exactly the following files: a. CuboidalTank.cpp/CuboidalTank.h b. CylindricalTank.cpp/CylindricalTank.h c. HexagonalPrismTank.cpp/HexagonalPrismTank.h d. Operator.cpp/Operator.h e. main.cpp 3. Consult the following formulae for tank volumes: Cuboid Volume = length × width × height Cylinder Volume = π × radius × radius × height Regular right hexagonal prism Volume = 2.5980762 × base edge × base edge × height 4. Every tank has a fixed volume. So the max possible volume of a tank is fixed. However, the current volume is not fixed. It depends on the liquidHeight. For example, The initial volume of the CuboidalTank is 24,000 units (max possible volume) The liquidHeight is 0 Current Volume 0 units After supply of oil, The initial volume of the CuboidalTank is 24,000 units (max possible volume) The liquidHeight is 12 Current Volume 720 units After supply of oil, The initial volume of the CuboidalTank is 24,000 units (max possible volume) The liquidHeight is 12 + 10 Current Volume 1,320 units operation.txt 10 000000000 Alexandre Desplat 08:04:2001 C 000000001 Bruno Coulais 08:04:2015 E 000000002 Danny Elfman 02:03:2015 P 000000003 Yann Tiersen 02:03:2014 C 000000004 Clint Mansell 02:03:2014 P 000000005 Hans Zimmer 11:09:2015 E 000000006 Rachel Portman 11:09:2010 M 000000007 Craig Armstrong 06:11:2014 S 000000008 Michael Giachino 09:11:2013 P 000000009 Ennio Morricone 09:11:2012 P


Related Questions in computer science category

SQL

Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.