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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started