Question: Add more tests to the main class. Add a unit test that tests displaySong on a song with a length that would require a leading
Add a unit test that tests displaySong on a song with a length that would require a leading zero.
Add a unit test that tests the four-parameter constructor with a seconds value that is greater than 59. Make sure this is the last test you perform since it will exit the program if it works correctly.
Run the main program to see if the tests were successful. The output should look something like this:
default constructor title: untitled artist: unknown length: 0 four-parameter constructor title: For What It's Worth artist: Buffalo Springfield length: 157 display method \"Blue Canadian Rockies\" (The Byrds) 2:02 four-parameter constructor with invalid seconds Error: invalid running time value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
