چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Object-Oriented Python : Master OOP by Building Games and GUIs

Irv Kalb

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Irv Kalb
سال انتشار
۲۰۲۲
فرمت
PDF
زبان
انگلیسی
حجم فایل
۱۱٫۸ مگابایت
شابک
9781718502062، 9781718502079، 1718502060، 1718502079

دربارهٔ کتاب

Power up your Python with object-oriented programming and learn how to write powerful, efficient, and re-usable code. Object-Oriented Python is an intuitive and thorough guide to mastering object-oriented programming from the ground up. You’ll cover the basics of building classes and creating objects, and put theory into practice using the pygame package with clear examples that help visualize the object-oriented style. You’ll explore the key concepts of object-oriented programming — encapsulation, polymorphism, and inheritance — and learn not just how to code with objects, but the absolute best practices for doing so. Finally, you’ll bring it all together by building a complex video game, complete with full animations and sounds. The book covers two fully functional Python code packages that will speed up development of graphical user interface (GUI) programs in Python. Acknowledgments 20 Introduction 22 Part I: Introducing Object-oriented Programming 30 Chapter 1: Procedural Python Examples 32 Higher or Lower Card Game 33 Bank Account Simulations 36 Common Problems with Procedural Implementation 47 Object-Oriented Solution—First Look at a Class 48 Summary 49 Chapter 2: Modeling Physical Objects with Object-Oriented Programming 50 Building Software Models of Physical Objects 51 Introduction to Classes and Objects 52 Classes, Objects, and Instantiation 54 Building a Slightly More Complicated Class 62 Representing a More Complicated Physical Object as a Class 64 Classes in Use 74 OOP as a Solution 74 Summary 75 Chapter 3: Mental Models of Objects and the Meaning of “self” 76 Revisiting the DimmerSwitch Class 77 High-Level Mental Model #1 78 A Deeper Mental Model #2 78 What Is the Meaning of “self”? 81 Summary 84 Chapter 4: Managing Multiple Objects 86 Bank Account Class 87 Importing Class Code 89 Creating Some Test Code 90 Creating an Object Manager Object 99 Better Error Handling with Exceptions 105 Using Exceptions in Our Bank Program 107 Calling the Same Method on a List of Objects 112 Interface vs. Implementation 113 Summary 114 Part II: Graphical User interfaces with Pygame 116 Chapter 5: Introduction to Pygame 118 Installing Pygame 119 Window Details 120 Event-Driven Programs 124 Using Pygame 125 Playing Sounds 143 Drawing Shapes 145 Summary 149 Chapter 6: Object-Oriented Pygame 150 Building the Screensaver Ball with OOP Pygame 150 Building a Reusable Object-Oriented Button 156 Building a Reusable Object-Oriented Text Display 162 Demo Ball with SimpleText and SimpleButton 164 Interface vs. Implementation 166 Callbacks 166 Summary 170 Chapter 7: Pygame GUI Widgets 172 Passing Arguments into a Function or Method 173 The pygwidgets Package 177 The Importance of a Consistent API 187 Summary 187 Part III: Encapsulation, Polymorphism, and Inheritance 190 Chapter 8: Encapsulation 192 Encapsulation with Functions 193 Encapsulation with Objects 193 Interpretations of Encapsulation 194 Making Instance Variables More Private 201 Decorators and @property 203 Encapsulation in pygwidgets Classes 206 A Story from the Real World 207 Abstraction 208 Summary 211 Chapter 9: Polymorphism 212 Sending Messages to Real-World Objects 213 A Classic Example of Polymorphism in Programming 213 Example Using Pygame Shapes 214 pygwidgets Exhibits Polymorphism 221 Polymorphism for Operators 222 Creating a String Representation of Values in an Object 232 A Fraction Class with Magic Methods 234 Summary 237 Chapter 10: Inheritance 240 Inheritance in Object-Oriented Programming 241 Implementing Inheritance 242 Employee and Manager Example 243 The Client’s View of a Subclass 247 Real-World Examples of Inheritance 248 Multiple Classes Inheriting from the Same Base Class 256 Abstract Classes and Methods 260 How pygwidgets Uses Inheritance 263 Class Hierarchy 265 The Difficulty of Programming with Inheritance 267 Summary 268 Chapter 11: Managing Memory Used by Objects 270 Object Lifetime 271 Class Variables 277 Putting It All Together: Balloon Sample Program 280 Managing Memory: Slots 290 Summary 292 Part IV: Using OOP in Game Development 294 Chapter 12: Card Games 296 The Card Class 297 The Deck Class 299 The Higher or Lower Game 301 Testing with __name__ 305 Other Card Games 307 Summary 308 Chapter 13: Timers 310 Timer Demonstration Program 311 Three Approaches for Implementing Timers 312 Installing pyghelpers 316 The Timer Class 316 Displaying Time 319 Summary 323 Chapter 14: Animation 324 Building Animation Classes 325 Animation Classes in pygwidgets 333 Summary 339 Chapter 15: Scenes 340 The State Machine Approach 341 A pygame Example with a State Machine 343 A Scene Manager for Managing Many Scenes 348 A Demo Program Using a Scene Manager 349 Rock, Paper, Scissors Using Scenes 357 Communication Between Scenes 361 Implementation of the Scene Manager 363 Summary 369 Chapter 16: Full Game: Dodger 370 Modal Dialogs 371 Building a Full Game: Dodger 376 Summary 395 Chapter 17: Design Patterns and Wrap-Up 396 Model View Controller 396 Wrap-Up 403 Index 406 "This guide to mastering object-oriented programming with Python covers the basics of building classes and creating objects through clear examples using the pygame package. Also explores key concepts like encapsulation, polymorphism, and inheritance as well as best practices for coding with objects"-- Provided by publisher

کتاب‌های مشابه

Object-Oriented Python : Master OOP by Building Games and GUIs

Object-Oriented Python : Master OOP by Building Games and GUIs

۴۹٬۰۰۰ تومان

Object-Oriented Python : Master OOP by Building Games and GUIs

Object-Oriented Python : Master OOP by Building Games and GUIs

۴۹٬۰۰۰ تومان

Object-Oriented Python : Master OOP by Building Games and GUIs

Object-Oriented Python : Master OOP by Building Games and GUIs

۴۹٬۰۰۰ تومان

Object-Oriented Python: Master OOP through Game Development and GUI Applications

Object-Oriented Python: Master OOP through Game Development and GUI Applications

۴۹٬۰۰۰ تومان

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

۴۹٬۰۰۰ تومان

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

۴۹٬۰۰۰ تومان

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

۴۹٬۰۰۰ تومان

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

Mastering Object-Oriented Python : Build Powerful Applications with Reusable Code Using OOP Design Patterns and Python 3.7, 2nd Edition

۴۹٬۰۰۰ تومان

ساخت مهارت‌ها در طراحی شیءگرا (با پایتون)

ساخت مهارت‌ها در طراحی شیءگرا (با پایتون)

۴۹٬۰۰۰ تومان

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

۴۹٬۰۰۰ تومان

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

۴۹٬۰۰۰ تومان

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

Mastering object-oriented Python : grasp the intricacies of object-oriented programming in Python in order to efficiently build powerful real-world applications

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۴٬۰۰۰ تومان