Question: Write a Java Program that does the following: Get Input from a file named stations.txt and load them into an array named radio[] Sort
Write a Java Program that does the following: Get Input from a file named stations.txt and load them into an array named radio[] Sort the array The file has 20 Radio Channers in it. For example: "WMZQ - Country Hits Radio" Ask the user to enter a 4 character channel Write a method named validChannel() to validate the channel (check that the user entered the correct number of characters and that it is letters only) Search the radio[] array for the channel the user entered If there is a match Output the channel info to the console Write the channel info to a .txt file named radioFav.txt Output to console "Your favorite channel has been saved" If there is no match, output to a dialog box, "Invalid Channel" At the end of your program, output to console "Thanks for using the Fav-Channels App" Comment you code thoroughly. Make sure that your code is KISS (Keep It Simple)
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
Heres a Java program that accomplishes the tasks youve described Ive kept the code as simple as possible while maintaining clarity import javaio impor... View full answer
Get step-by-step solutions from verified subject matter experts
