Testing a Class
- Test class: a class with a main method that contains statements
to
test another class.
- Typically carries out the following steps:
- Construct one or more objects of the class that is being
tested
- Invoke one or more methods
- Print out one or more results
- Details for building the program vary. In most environments, you
need to carry out these steps:
- Make a new subfolder for your program
- Make two files, one for each class
- Compile both files
- Run the test program