|
by 
[Help |
API Docs |
Short Course|
Exercises]
For this exercise you add an owner instance variable and the method setOwner to MusicStore.
Prerequisites
Skeleton Code
Tasks
Add the instance variable owner to MusicStore. The data type should be String and the initial value should be "No owner.", or something similar.
Add the method setOwner to MusicStore. This method should set the instance variable owner to whatever String value is passed as an argument.
Add functionality to TestMusicStore to set the store owner's name.
Compile the source code for MusicStore and TestMusicStore.
Execute TestMusicStore.
Where help exists, the task numbers above are linked to the step-by-step help page.
Solution Source
Demonstration
The output should be similar to the following, either on the command line or in an IDE window:
Store Hours:
Daily: 9:00 AM - 21:00 PM
Roberto Baggio, Proprietor
Copyright 1996-2000 jGuru.com. All Rights Reserved.
|