Question: Assignment Write two local classes and Pipe and EllipsoidContainer as described below. Then, write a main function that reads the flow speed and area of

Assignment Write two local classes and Pipe and EllipsoidContainer as described below. Then, write a main function that reads the flow speed and area of a Pipe object (P) both as double values. nain will also read the axis, the axis, and the axis of a EllipsoidContainer object (wingTank) all as double values. Finally, the inputpipe of wingTank will be the pipe object. Finally, the program should calculate the time it takes the wingTank to be completely filled with gas and prints it to the screen as a double value. pipe class - A private double field named "flowSpeed" representing the flow speed of the pipe. A private double field named 'area' representing the cross-section area (Le.. kesit alan) of the pipe. - A constructor that gets two double values and initializes the object. - An cnpty constructor - A public function and calculateFlourate that does not get any parameter, multiplies the flowspeed and area of the pipe, and returns it as a double value FilipsoidContainer Class A private double field and axis representing the A axis length of the ellipsoid. A private double field named 'axis representing the Baxis length of the ellipsold. A private double field and axisc representing the Caxis length of the ellipsoid. private Pipe field named 'InputPipe representing the pipe that provides water to this Ellipsoidcontainer. A constructor that gets three double values, a Pipe value, and initializes the object. - A public function and calculateVolume that does not get any parameter, calculates the volune of the pool using the ellipsoid volune formula given below and returns it as a double value: Volune (4 / 3) (2) nathr(P) () inathraxis) mathr(A) "() 5 axis Sinathr(B) (5 axis.4 - A public function and calculateTimeToFill that does not get any parameter, calculates the time it takes for the Ellipsoidcontainer to be filled with gas fron the pipe by dividing the volune of the EllipsoidContainer by the flow rate of the pipe and retuns it as a double value. The main function will, A private double field named 'axisc representing the Caxis length of the ellipsoid. - A private Pipe fleld named "inputPipe representing the pipe that provides water to this EllipsoldContainer. - A constructor that gets three double values, a Pipe value, and initializes the object. A public function and calculateVolune that does not get any parameter, calculates the volune of the pool using the ellipsoid volune formula glven below and returns it as a double value: 55 text (Volume )=(4 / 3) nathrn(PI)") inathen(axis) nahrn(A) \text (ais) mathrn(B) \text (SA) 55 - A public function and calculateTimeToFill that does not get any parameter, calculates the time it takes for the Ellipsoidcontainer to be filled with gas fron the pipe by dividing the volune of the EllipsoidContainer by the flow rate of the pipe and returns it as a double value. The main function will 1. Instantiate one Pipe object called Sinathra(o)s and instantiate an EllipsoidContainer object called wingtank as explained above. 2. Use the calculateTineToFill method of the EllipsoldContainer class to print out the time it takes to fill the EllipsoidContainer and print it out. NOTE: flowspeed and area will always be given as positive values. NOTE: All the functions MUST only do the tasks described above, nothing else. NOTE: Both classes MUST be written as described NOTE: To calculate Pl, you MUST use the M_PI constant from the cnath library. \begin{tabular) ICICICICI) Whline Input & 1536128 & 928710 & 351512 Whline Output & 553.61655 & 5130.3185 & 516.75525 hlin Vend(tabular) Answar assignment SE.SD.010
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
