Book Image

Learning Object-Oriented Programming

By : Gaston C. Hillar
Book Image

Learning Object-Oriented Programming

By: Gaston C. Hillar

Overview of this book

Table of Contents (16 chapters)
Learning Object-Oriented Programming
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Classes and Instances

In this chapter, we will start generating blueprints to create objects in each of the three programming languages: Python, JavaScript, and C#. We will:

  • Understand the differences between classes, prototypes, and instances in object-oriented programming

  • Learn an object's lifecycle and how object constructors and destructors work

  • Declare classes in Python and C# and use workarounds to have a similar feature in JavaScript

  • Customize the process that takes place when you create instances in Python, C#, and JavaScript

  • Customize the process that takes place when you destroy instances in Python, C#, and JavaScript

  • Create different types of objects in Python, C#, and JavaScript