Question: Problem 1 - Implement the Soda Can Class ( 2 5 points ) Write a program which implements a Soda can which is a cylinder.

Problem 1- Implement the Soda Can Class (25 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:
V=\pi r^(2)h
and the formula for the surface area of a cylinder is:
A=2\pi rh+2\pi r^(2)
Where r is the radius and h is the height of the cylinder. If you compiler is at C++20 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 2- Implement the Microwave Class -25 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 30 seconds, one for switching between power levels 1(100\%) and 2(50\%), 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 0 seconds cook time and power level to 1 ; the add time button adds 30 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:
Problem 1 - Implement the Soda Can Class ( 2 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!