Question: Problem 1 - Implement the Soda Can Class ( 2 5 points ) Write a program which implements a Soda can which is a cylinder.
Problem Implement the Soda Can Class points
Write a program which implements a Soda can which is a cylinder. Add a constructor
create a soda can with parameter values for radius and height. Add two computing
accessors which return the volume and the surface area of the can. The formula for
the volume of a cylinder is:
Vpi rh
and the formula for the surface area of a cylinder is:
Api rhpi r
Where r is the radius and h is the height of the cylinder. If you compiler is at C or
later, use std:inumbers::pi for the value of pi otherwise research the best way to
obtain the value.
Write a program that tests each function and displays the results of their use.
Design, edit, run, test, and debug your program. Enter the completed C code here: Problem Implement the Microwave Class points
Write a program which defines a Microwave class that simulates the microwave, with a member function for each button. The microwave control panel has four buttons: one for increasing the time by seconds, one for switching between power levels and a reset button, and a start button. Implement a class and each member function. The start button should print a message "Cooking for seconds at level ; the reset button should reset the time to seconds cook time and power level to ; the add time button adds seconds to the existing cook time. The constructor should call the reset method to initialize the microwave.
Write test code to press the power button a few times, the add time button a few times, the start button, and finish by pressing the reset button then the start button.
Design, edit, run, test, and debug your program. Enter the completed C code here:
C code for the lab project:
Run the code, take a screenshot of the results, including the input and output files, and insert the screenshot here:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
