Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

1.2. Introduction to OOP

The adventure starts here. We’ll cover the theoretical side, but there will be a good mix of real code examples too—sometimes it’s much easier to see these ideas in code!

1.2.1. Declaring a Class

The class is a blueprint—a set of instructions for how to create an object. It isn’t a real object—it just describes one. In our web applications, we have classes to represent all sorts of entities. Here’s a Courier class that might be used in an ecommerce application:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint