Learning Object-Oriented Programming
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Condividi libro
  1. 280 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul 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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Learning Object-Oriented Programming è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Learning Object-Oriented Programming di Gaston C. Hillar in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Ciencia de la computación e Programación en Python. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
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 ...

Indice dei contenuti