Object-oriented programming
Objetives
Upon completion of this lab, you should be able to:
- Use the Java API documentation to research a class
- Explore information hiding and encapsulation
- Use packages to organize your classes
Exercise 1: Using the Java API Documentation
In this exercise, you explore the Java 2 platform, Standard Edition (J2SE) API documentation to explore the methods of a class.
Preparation
You must also have a web browser open
Task - Using the Java API Documentation
- Open the Java 2 Platform API Specification Web page in your browser
- Select the java.text package in the package list in the upper-left corner of the API frameset
- Select the NumberFormat class in the class list in the lower-left panel
- Read about the class in the top part of the documentation window on the right panel of the frameset. Review the format and parse methods.
Exercise 2: Exploring Encapsulation, Version 1 (Level 1, Level 2, Level 3)
Exercise 3: Exploring Encapsulation, Version 2 (Level 1, Level 2, Level 3)
Exercise 4: Creating a Simple Bank Package (Level 1 & 2, Level 3)