Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Apple TV^TM is a personal video device created by Apple, Inc. that attaches

ID: 2080291 • Letter: T

Question

The Apple TV^TM is a personal video device created by Apple, Inc. that attaches to high definition televisions to present streaming content to a viewer on demand, in contrast to a standard source (cable/satellite) set-top box or digital video recorder (DVR) that presents recorded or live broadcast signals on a television. According to a study conducted by the Natural Resources Defense Council in June 2011, if consumers were to move from set-top boxes to smaller "thin" devices like the Apple TV, there would be an overall 70% reduction in annual energy costs resulting from use of set-top boxes if they were replaced by smaller energy efficient devices like the Apple TV. Below is a data table that shows the typical power consumption of the Apple TV in different power states (standby/off, idle-not playing any video content, playing via Ethernet, and playing via Wife). Create an algorithm that allows a user to provide the power currently being used by their Apple TV in units of watts and determine the state of the device. If the user provides value for the power outside of the range in the table below, your algorithm should report that the state of the device is unknown.

Explanation / Answer

The programme is in MATLAB. The name of programme file is ‘AppleTV’.

Code:

prompt = 'What is the value of power being used by Apple TV in watts? ';

power = input(prompt);

if power < 0.5

disp('The Apple TV device is switched off or in Standby mode')

elseif power > 0.5 && power < 1.5

disp('The Apple TV device is Idle')

elseif power > 1.5 && power < 1.6

disp('The Apple TV device is streaming media via Ethernet')

elseif power > 1.6 && power < 2

disp('The Apple TV device is streaming media via Wifi')

else

disp('The state of Apple TV device is unknown')

end

Output:

>> AppleTV

What is the value of power being used by Apple TV in watts? 0.4

The Apple TV device is switched off or in Standby mode

>> AppleTV

What is the value of power being used by Apple TV in watts? 1.2

The Apple TV device is Idle

>> AppleTV

What is the value of power being used by Apple TV in watts? 1.55

The Apple TV device is streaming media via Ethernet

>> AppleTV

What is the value of power being used by Apple TV in watts? 1.8

The Apple TV device is streaming media via Wifi

>> AppleTV

What is the value of power being used by Apple TV in watts? 4

The state of Apple TV device is unknown