Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
Java Language EssentialsDownload tutorial zip fileEmail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
Exercises
  


9. MusicStore: String Concatenation: Tasks page 26 of 31


For this exercise you (1) modify displayHoursOfOperation() to use the current date and time values and (2) add a toString() method to MusicStore.

For more help with exercises, see About The Exercises

PrerequisitesSkeleton Code

Tasks

  • Task 1

    Modify the method displayHoursOfOperation() so that it properly reports opening and closing times, that is, consistent with the times stored in the respective instance variables.

  • Task 2

    Add a toString() method to MusicStore that concatenates together pertinent information for the current instance and returns the resulting String.

  • Task 3

    Modify TestMusicStore to test/display the functionality of MusicStore's toString() method.

  • Task 4

    Compile the source code for MusicStore and TestMusicStore.

  • Task 5

    Execute TestMusicStore.

Help for each of these tasks can be found on the next page.


copyright 1996-2000 Magelang Institute dba jGuru


Main menuSection menuGive feedback on this tutorialPrevious panelNext panel
PrivacyLegalContact