Learning Object-Oriented Programming
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Compartir libro
  1. 280 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

If you're a Python, JavaScript, or C# developer and want to learn the basics of object-oriented programming with real-world examples, then this book is for you.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Learning Object-Oriented Programming un PDF/ePUB en línea?
Sí, puedes acceder a Learning Object-Oriented Programming de Gaston C. Hillar en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Programación en Python. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781785289637

Learning Object-Oriented Programming


Table of Contents

Learning Object-Oriented Programming
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
eBooks, discount offers, and more
Questions
1. Objects Everywhere
Recognizing objects from nouns
Generating blueprints for objects
Recognizing attributes/fields
Recognizing actions from verbs – methods
Organizing the blueprints – classes
Object-oriented approaches in Python, JavaScript, and C#
Summary
2. Classes and Instances
Understanding classes and instances
Understanding constructors and destructors
Declaring classes in Python
Customizing constructors in Python
Customizing destructors in Python
Creating instances of classes in Python
Declaring classes in C#
Customizing constructors in C#
Customizing destructors in C#
Creating instances of classes in C#
Understanding that functions are objects in JavaScript
Working with constructor functions in JavaScript
Creating instances in JavaScript
Summary
3. Encapsulation of Data
Understanding the different members of a class
Protecting and hiding data
Working with properties
Understanding the difference between mutability and immutability
Encapsulating data in Python
Adding attributes to a class
Hiding data in Python using prefixes
Using property getters and setters in Python
Using methods to add behaviors to classes in Python
Encapsulating data in C#
Adding fields to a class
Using access modifiers
Using property getters and setters in C#
Working with auto-implemented properties
Using methods to add behaviors to classes in C#
Encapsulating data in JavaScript
Adding properties to a constructor function
Hiding data in JavaScript with local variables
Using property getters and setters in JavaScript
Using methods to add behaviors to constructor functions
Summary
4. Inheritance and Specialization
Using classes to abstract behavior
Understanding inheritance
Understanding method overloading and overriding
Understanding operator overloading
Taking advantage of polymorphism
Working with simple inheritance in Python
Creating classes that specialize behavior in Python
Using simple inheritance in Python
Overriding methods in Python
Overloading operators in Python
Understanding polymorphism in Python
Working with simple inheritance in C#
Creating classes that specialize behavior in C#
Using simple inheritance in C#
Overloading and overriding methods in C#
Overloading operators in C#
Understanding polymorphism in C#
Working with the prototype-based inheritance in JavaScript
Creating objects that specialize behavior in JavaScript
Using the prototype-based inheritance in JavaScript
Overriding methods in JavaScript
Overloading operators in JavaScript
Understanding polymorphism in JavaScript
Summary
5. Interfaces, Multiple Inheritance, and Composition
Understanding the requirement to work with multiple base classes
Working with multiple inheritance in Python
Declaring base classes for multiple inheritance
Declaring classes that override methods
Declaring a class with multiple base classes
Working with instances of classes that use multiple inheritance
Working with abstract base classes
Interfaces and multiple inheritance in C#
Declaring interfaces
Declaring classes that implement interfaces
Working with multiple inheritance
Working with methods that receive interfaces as arguments
Working with composition in JavaScript
Declaring base constructor functions for composition
Declaring constructor functions that use composition
Working with an object composed of many objects
Working with instances composed of many objects
Summary
6. Duck Typing and Generics
Understanding parametric polymorphism and duck typing
Working with duck typing in Python
Declaring a base class that defines the generic behavior
Declaring subclasses for duck typing
Declaring a class that works with duck typing
Using a generic class for multiple types
Working with duck typing in mind
Working with generics in C#
Declaring an interface to be used as a constraint
Declaring an abstract base class that implements two interfaces
Declaring subclasses of an abstract base class
Declaring a class that works with a constrained generic type
Using a generic class for multiple types
Declaring a class that works with two constrained generic types
Using a generic class with two generic type parameters
Working with duck typing in JavaScript
Declaring a constructor function that defines the generic behavior
Working with the prototype chain and duck typing
Declaring methods that work with duck typing
Using generic methods for multiple objects
Working with duck typing in mind
Summary
7. Organization of Object-Oriented Code
Thinking about the best ways to organize code
Organizing object-oriented code in Python
Working with source files organized in folders
Importing modules
Working with module hierarchies
Organizing object-oriented code in C#
Working with folders
Using namespaces
Working with namespace hierarchies in C#
Organizing object-oriented code in JavaScript
Working with objects to organize code
Declaring constructor functions within objects
Working with nested objects that organize code
Summary
8. Taking Full Advantage of Object-Oriented Programming
Putting together all the pieces of the object-oriented puzzle
Refactoring existing code in Python
Refactoring existing code in C#
Refactoring existing code in JavaScript
Summary
Index

Learning Object-Oriented Programming

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide ...

Índice