Question: In Java Programming Language Create an interface called edu.udc.cs2.song. Song must have 2 methods defined like: public String getSongName(); public int getSeconds; //returns the number

 In Java Programming Language Create an interface called edu.udc.cs2.song. Song must

In Java Programming Language

Create an interface called edu.udc.cs2.song. Song must have 2 methods defined like: public String getSongName(); public int getSeconds; //returns the number of SECONDS the song lasts Create a class named edu.udc.cs2. Midterm. Create the following method: public static int showSong(List Ist) The method must iterate the passed in List of Song and will output according to the following: If the song is outside of the range of 2 seconds and 20 minutes, inclusive, throw a RuntimeException at which point the program will automatically end unless you include a try catch in your call. If the getSeconds() method returns the number of seconds more than 5 minutes, output: song name is a long song. if less than 5 minutes, output: song name is a short song. Where song name is the name returned from getSongName() method. Turn in TWO classes Song.java and Midterm.java. Extra Credit Create a class named edu.udc.cs2.Tune that will implement Song. You must be able to only instantiate as below: Song 51 = new Tune("What You Did", 300); Hopefully, you can figure out that in the example "What You Did" is the name of the song and 300 is the number of seconds. These values must be properly returned from interface methods. Create a main method in the Midterm class and do the following in that main: Create a List

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!