Learning Object-Oriented Programming
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Partager le livre
  1. 280 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

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.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Learning Object-Oriented Programming est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Learning Object-Oriented Programming par Gaston C. Hillar en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Ciencia de la computaciĂłn et ProgramaciĂłn en Python. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
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 ...

Table des matiĂšres