[Solved]Python Classes Object Oriented Programming Create Python Code Program Simulate Car Radio 3 Q37062402
PYTHON: Classes and Object OrientedProgramming
Create the Python code for a program that will simulatea car radio with 3 presets and 5 stations to tune in.
You will create class functions forthe following:
-
__init__ AND __str__
-
seekNext
-
longPressPreset1 through 3
-
shortPressPreset1 through 3
-
displayLCD
You will create program functions for thefollowing:
-
main
-
displayMenuGetOption
NOTE:
-
Messages and prompts should look EXACTLY like those in theOutput (below).
-
You may use either Public or Private instance variables, but beconsistent in your use.
-
Assume that the radio is in an “ON” state upon instantiation ofyour radio instance.
-
The five available stations are: “STATIC”, “97.2”, “99.6”,”101.7″, “105.3”, “108.5” with the radio’s initial state having allpresets set to “STATIC” and the currently tuned in station as“STATIC”.
-
Ignore the user selection if a user types in a value that doesnot exist in the menu.
OUTPUT:
Currently Tuned: STATIC1 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 9Preset 1: STATICPreset 2: STATICPreset 3: STATICCurrently tuned: STATIC1 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 5Currently Tuned: 97.21 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 2Currently Tuned: 97.21 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 5Currently Tuned: 99.61 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 5Currently Tuned: 101.71 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 4Currently Tuned: 101.71 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 9Preset 1: 97.2Preset 2: STATICPreset 3: 101.7Currently tuned: 101.71 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 6Currently Tuned: 97.21 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 5Currently Tuned: 99.61 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 2Currently Tuned: 99.61 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 9Preset 1: 99.6Preset 2: STATICPreset 3: 101.7Currently tuned: 99.61 = Display tuned in station2 = Program preset station 13 = Program preset station 24 = Program preset station 35 = Seek next station6 = Tune preset station 17 = Tune preset station 28 = Tune preset station 39 = Dump Programming10 = Turn off radioEnter option: 10Run complete. Press the Enter key to exit.>>>
Expert Answer
Answer to PYTHON: Classes and Object Oriented Programming Create the Python code for a program that will simulate a car radio with… . . .
OR

