Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this project, please create a Java class called RadioStationException that extends Exception. RadioStationException should have a constructor that receives a radio station's call sign

For this project, please create a Java class called RadioStationException that extends Exception. RadioStationException should have a constructor that receives a radio station's call sign (for example, WJRR) and carrier frequency (for example, 101.1).

Create a second class named RadioStation that has the same fields and whose constructor requires values for both fields. Upon construction of a RadioStation object, throw a RadioStationException if the call sign does not consist of four letters or if the carrier frequency is not between 88 and 108 inclusive.

Finally, write an application that creates an array of at least six RadioStation objects by asking the user to input call signs and carrier frequencies. Display an appropriate message when a RadioStation object is created successfully and also when one is not. Be sure to test your program with valid and invalid values.

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

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

Students also viewed these Databases questions

Question

=+17.14. 1 Extend the ideas in the preceding two problems to R *.

Answered: 1 week ago

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago