Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. (40 pts.) Class design submit UML diagram Design a class to represent a radio device. Based on the basic description given below, draw your

image text in transcribed

Q1. (40 pts.) Class design submit UML diagram Design a class to represent a radio device. Based on the basic description given below, draw your design's UML diagram. .Radio can be turned on/off by the push of a button. .There is only the FM broadcast band with range 87.5 to 108MHz. This range is common to all radios. Current frequency can be adjusted using a dial. The precision of a dial move is 0.5 (e.g., at 88.0, moving the dial forward by 1 unit advances the frequency to 88.5). The dial is actuated by moving forward/backward by the specified unit. Every radio has 5 pre-set channels. Initially, these channels are filled with 5 equal-distance frequency values (i.e., 87.5, 92.5, 97.5, 102.5 and 107.5). The radio owner, however can change these presets as she likes by pressing and holding a preset button at the current frequency. A short press of a preset button, changes current frequency to the preset channel frequency Finally, there is a volume control dial. Turning the dial forward/backward increases/decreases the volume level. .When turned back on, the radio opens at the frequency it was turned off. There is a display that shows all internal data of the radio. [Simulate this by writing on the console all data field values.] On/off button SNOOZE Volume dial TUNING Q2. (60 pts.) Class implementation submit Java source file Implement your answer to Q1 above. Add a separate test class that contains a main method. The main method should show the usage of your class (e.g., create radio device, tune to a frequency change a preset, turn off and then back on, etc.). WARNING: the maximum grade you get from Q2 depends on the quality/completeness of your answer to Q1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

What is a consistent database state, and how is it achieved?

Answered: 1 week ago