Learning Object-Oriented Programming
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Buch teilen
  1. 280 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Learning Object-Oriented Programming

Gaston C. Hillar

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Learning Object-Oriented Programming als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Learning Object-Oriented Programming von Gaston C. Hillar im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Programación en Python. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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

Inhaltsverzeichnis