Question: In a previous exercise, you were asked to create a car radio. The assignment required you to draw and label the components. In this lab
In a previous exercise, you were asked to create a car radio. The assignment required you to draw and label the components. In this lab you will build a simplified car radio object using the JavaScript template with several properties and methods. Your car radio object must meet the following requirements:
The car radio must be named carRadio.
The car radio must have the following components properties:
powerStatus determines if the radio is off or on
volume provides the level of amplification loudness
device toggles between FM and external device.
fmStation indicates the frequency of the currently selected band when the device is in FM mode. If device is external the station is empty string or
The car radio must have a set and get method for EVERY property set methods and get methods
The set methods for the following properties must meet the following conditions:
Power status can only accept the values "off" or on
Volume can only accept the values between and inclusive
Device can only accept the values FM and "EXTERNAL" case sensitive
Station should check that the device is FM and not "EXTERNAL". If the device is "EXTERNAL" the station should not change
Your object should contain a method to display each of the properties in the order power status, volume, device, and fmStation on the web page when the values are initially set and after the values have been changed.
Hint: Remember conditional statements are if statements or switch statements. By adding conditional statements we can ensure that our conditions are met. If an incorrect value is sent to the set method, the object should retain its previous value.
Please submit your work as an HTML document with the naming convention CMSYNXFirstInitialLastNameLab# replacing the X with your section, FirstInitialLastName with your personal information and the # with the exercise number
Rubric
Lab Car Radio
Lab Car Radio
Criteria Ratings Pts
This criterion is linked to a Learning OutcomeThe car radio object must be named carRadio and contain all required components
pts
Full Marks
pts
No Marks
pts
This criterion is linked to a Learning OutcomeThe car radio must have a set and get method for EVERY property
pts
Full Marks
pts
No Marks
pts
This criterion is linked to a Learning OutcomeThe set methods must validate input
The set methods for the properties must meet the conditions described in the directions.
pts
Full Marks
pts
No Marks
pts
This criterion is linked to a Learning OutcomeThe car radio object contains a method to display the properties in order.
pts
Full Marks
pts
No Marks
pts
Total Points:
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
