|
by
[Exercise |
API Docs |
Short Course|
Exercises]
|
For most environments, the source code should be in a file named MusicStore.java.
Some environments, however, are not source file-oriented (for example, VisualAge for Java),
in which case you simply type the code into the appropriate IDE window(s).
Task 2
Design and implement TestMusicStore as a public class with one public static void method main(). main() performs the following tasks:
For most environments, the source code should be in a file named TestMusicStore.java. Some environments, however, are not source file-oriented (for example, VisualAge for Java), in which case you simply type the code into the appropriate IDE window(s).
main() must have the signature:
public static void main(String[] args) {
// code here
}
Compile the source code for MusicStore and TestMusicStore.
Some Java environments require a CLASSPATH setting. You should set the
CLASSPATH environment variable to include the current directory, but only if your
environment requires CLASSPATH.
Task 4
Execute TestMusicStore.
With the JDK, for example, simply invoke the Java interpreter with TestMusicStore as an argument:
D:\>java TestMusicStore
Copyright 1996-2000 jGuru.com. All Rights Reserved.
|
| ||||||||||||