Sample Outcomes for A07

Return to assignment description

The following are some of the possible outcomes of running the TestMusicTrack program for A07.

Note that indicates a place where the user presses the enter key.


What you should see when you run TestMusicTrack once your MusicTrack class is complete:
=== Testing the default constructor === (If you don't see any errors above, good!) ... Press Enter to continue --- now those with errors --- You should see the error message for 'length' with -2.0 below ERROR: Invalid length -2.0, setting it to 0 You should see the error message for 'length' with -5.0 below ERROR: Invalid length -5.0, setting it to 0 You should see the error message for 'length' with -7.0 below ERROR: Invalid length -7.0, setting it to 0 You should see the error message for 'downloadCount' with -58 ERROR: Invalid downloadCount -58, setting it to 0 You should see the error message for 'downloadCount' with -240 ERROR: Invalid downloadCount -240, setting it to 0 ... Press Enter to continue === Testing getters === Should print Michael Brecker: Michael Brecker Should print Midnight Mood: Midnight Mood Should print 6.38: 6.38 Should print 2560174: 2560174 ... Press Enter to continue --- now those with errors --- (They should have been set to zeros in the default constructor) Should print 0.0: 0.0 Should print 0: 0 ... Press Enter to continue === Testing setters === Should (literally!!) print Something: Something Should print 3.03: 3.03 Should print 235959475: 235959475 ... Press Enter to continue --- now those with errors --- Should see the error for length (-1.0) but no change ERROR: Invalid length -1.0, the value is unchanged Should see the error for length (-20.0) but no change ERROR: Invalid length -20.0, the value is unchanged Should still print 3.03: 3.03 Should see the error for downloadCount (-100) but no change ERROR: Invalid downloadCount -100, the value is unchanged Should see the error for downloadCount (-50) but no change ERROR: Invalid downloadCount -50, the value is unchanged Should print 235959475: 235959475 ... Press Enter to continue

Return to assignment description