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:
turn_on takes no arguments, returns no value, and turns on the oven;
turn_off takes no arguments, returns no value, and turns off the oven;
set_ventilated takes a bool argument, returns no value, and sets the oven to ventilated;
set_temperature takes a float argument, returns no value, and sets the target temperature;
get_temperature takes no argument and returns the current temperature of the oven.
Assume my_oven refers to an Oven object. Write some code that turns the oven on, sets the target temperature to 200 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 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 Databases Questions!