Lesson 30. Making your own object types

 

After reading lesson 30, you’ll be able to

  • Understand that an object has properties
  • Understand that an object has operations associated with it
  • Understand what dot notation means when working with objects

You use objects all the time in your daily life. You use computers and phones, handle boxes and envelopes, and interact with people and animals. Even numbers and words are basic objects.

Every object you use is made up of other objects. Except for the basic building blocks of matter, every object you interact with can be decomposed into smaller objects. For example, your calculator can be decomposed into a few basic components: the logic chip, screen, and buttons (and each of these into smaller components). Even a sentence can be decomposed into individual words arranged in a certain order.

Every object you interact with has certain behaviors. For example, a basic calculator can do mathematical operations but can’t check email. The calculator has been programmed to work in a certain way depending on which key or button is pressed. Words in different languages can be arranged differently, according to the rules of the language, to form sentences that make sense.

30.1. Why do you need new object types?

 
 
 

30.2. What makes up an object?

 
 

30.3. Using dot notation

 
 
 

Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage