CreateSpace Independent Publishing Platform, 2017. — 313 p. — ISBN 9781548000899.
This book covers most of the advanced topics in Computer Programming, such as Object Oriented Design, Data Structures, Functional Programming, MetaClasses, Abstract Classes, Exceptions, Testing, Threading, Simulation, Graphical Interfaces, Input/Output, Networking and Web Services. All these topics are based on the Python 3 language. On each chapter, besides the theory, there is always code showing examples of applications. Also, at the end of each chapter, there are two hands-on activities, where a harder problem is defined, encouraging readers to solve them by themselves. We include all the solutions at the end of the book.
Contents
Object Oriented ProgrammingClasses
Properties
Aggregation and Composition
Inheritance
Multiple Inheritance
Abstract Base Class
Class Diagrams
Hands-On Activities
Data StructuresArray-Based Data Structures
Node-based Data Structures
Hands-On Activities
Functional ProgrammingPython Functions
Decorators
Hands-On Activities
Meta ClassesCreating classes dynamically
Metaclasses
Hands-On Activities
ExceptionsException Types
Raising exceptions
Exception handling
Creating customized exceptions
Hands-On Activities
TestingUnittest
Pytest
Hands-On Activities
ThreadingThreading
Synchronization
Hands-On Activities
SimulationSynchronous Simulation
Discrete Event Simulation (DES)
Hands-On Activities
Handling Strings and BytesSome Built-in Methods for Strings
Bytes and I/O
Bytearrays
Hands-On Activities
I/O FilesContext Manager
Emulating files
SerializationSerializing web objects with JSON
Hands-On Activities
NetworkingHow to identify machines on internet
Ports
Sockets
Client-Server Architecture
Sending JSON data
Sending data with pickle
Hands-On Activities
Web ServicesHTTP
REST architecture
Client-side Script
Server-side Script
Request
Request Data
Response
Other architectures for Web Services
Graphical User InterfacesPyQt
Layouts
Events and Signals
Sender
Creating Custom Signals
Mouse and Keyboard Events
QT Designer
Solutions for Hands-On ActivitiesSolution for activity 1.1: Variable stars
Solution for activity 1.2: Geometric Shapes
Solution for activity 2.1: Production line of bottles
Solution for activity 2.2: Subway Map
Solution for activity 3.1: Patients in a Hospital
Solution for activity 3.2: Soccer Team
Solution for activity 3.3: Hamburger Store
Solution for activity 4.1: MetaRobot
Solution for activity 5.1: Calculator
Solution for activity 6.1: Testing the encryptor
Solution for activity 6.2: Testing ATMs
Solution for activity 7.1: Godzilla
Solution for activity 7.2: Mega Godzilla
Solution for activity 8.1: Client queues
Solution for activity 8.2: GoodZoo
Solution for activity 9.1: Fixing data
Solution for activity 9.2: Audio files
Solution for activity 11.1: Cashiers’ data