Java Programming   Java Programming
 |Sofia Home | Content Gallery |
Home
Syllabus
Schedule
Lessons
Assignments
Resources

Lesson 9 - Composition

Learning to program with Java is fun because there are so many built-in objects--Button, Label, TextField, etc--and it is so easy to use them. Not only that, you can combine different classes to create your own new objects. This is called composition.

Lesson 9 sections are as follows:

9.1 Combining Objects

Learn how to create and use simple composite objects.

9.2 Default Constructor

Learn to write a default constructor for a composite class.

9.3 Other Constructors Learn how to write overloaded constructors and use the method this().
9.4 Methods

Learn to write accessor and mutator methods to provide access to private fields.

9.5 Scrollbar

Learn to create Scrollbar objects and respond to Scrollbar events.

9.6 Packages

Learn about access specifiers and how to create your own packages.

Continue with section 9.1 Combining Objects

Back to Top
Content Developed by Stephen Gilbert, Licensed under a Creative Commons License
Published by the Sofia Open Content Initiative
© 2004 Foothill-De Anza Community College District &The William and Flora Hewlett Foundation