Question: Goal: Learn to use methods on existing objects to update their state. Assignments: Assume the class Oven exists and has the following methods: turn _
Goal: Learn to use methods on existing objects to update their state.
Assignments: Assume the class Oven exists and has the following methods:
turnon takes no arguments, returns no value, and turns on the oven;
turnoff takes no arguments, returns no value, and turns off the oven;
setventilated takes a bool argument, returns no value, and sets the oven to ventilated;
settemperature takes a float argument, returns no value, and sets the target temperature;
gettemperature takes no argument and returns the current temperature of the oven.
Assume myoven refers to an Oven object. Write some code that turns the oven on sets the target temperature to degrees, waits until that temperature is reached and only then turns the ventilation on
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
