正在加载图片...
Contents 10.5.3 Module Documentation ........... 315 10.5.4 Working with Multiple Modules 317 10.6 Widgets 318 10.6.1 Example Program:Dice Roller 319 10.6.2 Building Buttons.… 319 10.6.3 Building Dice..... 323 10.6.4 The Main Program 327 10.7 Chapter Summary ........... 328 10.8 Exercises.… 329 Chapter 11 Data Collections 337 11.1 Example Problem:Simple Statistics 337 11.2 Applying Lists… 339 11.2.1 Lists and Arrays 340 11.2.2 List Operations.... 341 11.2.3 Statistics with Lists. 345 11.3 Lists of Objects… 350 11.4 Designing with Lists and Classes................. 353 11.5 Case Study:Python Calculator....... 359 11.5.1 A Calculator as an Object............ 359 11.5.2 Constructing the Interface....... 360 11.5.3 Processing Buttons............. 363 11.6 Non-Sequential Collections 367 11.6.1 Dictionary Basics.................. 367 11.6.2 Dictionary Operations 368 11.6.3 Example Program:Word Frequency 370 11.7 Chapter Summary.… 375 11.8 Exercises........ 376 Chapter 12 Object-Oriented Design 385 12.1 The Proces55 of OOD.… 385 12.2 Case Study:Racquetball Simulation 388 12.2.1 Candidate Objects and Methods 388 12.2.2 Implementing SimStats......... 390 12.2.3 Implementing RBallGame..... 392 12.2.4 Implementing Player........... 44 395 12.2.5 The Complete Program .......... 396 12.3 Case Study:Dice Poker........... 399 12.3.1 Program Specification............ 399 12.3.2 Identifying Candidate Objects 400 12.3.3 Implementing the Model......... 402 12.3.4 A Text-Based Ul................ 406 12.3.5 Developing a GUl 409 12.4 00 Concepts... 417 12.4.1 Encapsulation.... 418 12.4.2 Polymorphism 418Contents vii 10.5.3 Module Documentation 315 10.5.4 Working with Multiple Modules 317 10.6 Widgets 318 10.6.1 Example Program: Dice Roller 319 10.6.2 Building Buttons 319 10.6.3 Building Dice 323 10.6.4 The Main Program 327 10.7 Chapter Summary 328 10.8 Exercises 329 Chapter 11 Data Collections 337 11.1 Example Problem: Simple Statistics 337 11.2 Applying Lists 339 11.2.1 Lists and Arrays 340 11.2.2 List Operations 341 11.2.3 Statistics with Lists 345 11.3 Lists of Objects 350 11.4 Designing with Lists and Classes 353 11.5 Case Study: Python Calculator 359 11.5.1 A Calculator as an Object 359 11.5.2 Constructing the Interface 360 11.5.3 Processing Buttons 363 11.6 Non-Sequential Collections 367 11.6.1 Dictionary Basics 367 11.6.2 Dictionary Operations 368 11.6.3 Example Program: Word Frequency 370 11.7 Chapter Summary 375 11.8 Exercises 376 Chapter 12 Object-Oriented Design 385 12.1 The Process of OOD 385 12.2 Case Study: Racquetball Simulation 388 12.2.1 Candidate Objects and Methods 388 12.2.2 Implementing SimStats 390 12.2.3 Implementing RBallGame 392 12.2.4 Implementing Player 395 12.2.5 The Complete Program 396 12.3 Case Study: Dice Poker 399 12.3.1 Program Specification 399 12.3.2 Identifying Candidate Objects 400 12.3.3 Implementing the Model 402 12.3.4 A Text-Based Ul 406 12.3.5 Developing a GUI 409 12.4 00 Concepts 417 12.4.1 Encapsulation 418 12.4.2 Polymorphism 418
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有