Question: 5 . 1 1 HOMEWORK PROBLEMS 5 . 1 Work with a DVD player and develop an exhaustive set of events that you think the

5.11 HOMEWORK PROBLEMS
5.1 Work with a DVD player and develop an exhaustive set of events that you think the software
must sense and respond to.
5.2 Identify the events and draw an STD for the behavior of a DVD player. Limit yourself to the
events generated by the DVD player (ignore the remote control).
5.3 Given a function GetRoomTemperature() that returns the room temperature and a variable,
SetPoint, write a pair of functions in pseudo-code called IsTemperatureTooHot() and IsTemper-
atureTooCool() that return TRUE-FALSE values and together implement a hysteresis band
around the SetPoint temperature.
5.4 Work with an answering machine to develop the list of events that the machine's software must
respond to.
5.5 You are writing code to implement cruise control for a car. Given a function GetVehicleSpeed()
that returns the speed of a vehicle, write a single function TestAccelDecel() in pseudo-code that
returns, NeedAccelerate, NeedDecelerate, or SpeedOK based on the speed relative to a set
point DesiredSpeed. To provide noise immunity, implement hysteresis around the switch point.
5.6 In an application, the state of a switch is determined by reading a variable called PortA. The state
of the switch is indicated by the state value of bit 4 within the byte variable PortA. In pseudo-
code, write an event checking function TestSwitch() that returns Opened, Closed, or NoChange
depending on what has happened since the last time TestSwitch() was called.
5.7 Work with a microwave oven to develop the list of events that the oven's software must respond to.
5 . 1 1 HOMEWORK PROBLEMS 5 . 1 Work with a DVD

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!