Question: Using java 5. ( from problem R 4.18 in your text) Write a program that calculates the volume of a cocktail shaker. R2 R1 &
5. ( from problem R 4.18 in your text) Write a program that calculates the volume of a cocktail shaker. R2 R1 & H1 are the height and dius of one cylinder, R2 & H2 re the height and radius of the econd cylinder, and R3 is the eight of the cone H3 H1 R1 A cocktail shaker is in essence two cylinders joined by a cone. We've seen the formula for calculating the volume of a cylinder. In this problem the volume of the cone section can be calculated as: VC = (r12 + r1r2 + r22)h 3 For this program determine what the main program should do, and what should be encapsulated into methods
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
