Tqst Drove

With the code in IDLE and all the sound files in the directory, press F5. You should see something that looks a lot more powerful than the simple two-track mixer you had before:

Every single track from the directory now appears on the interface and can be individually controlled. The program looks like it finally does everything the DJ wants. But the real test will be how it performs at World Music Mixing Expo...

programming rocks the house

It's party time!

programming rocks the house

The mixer program brought the house down!

The DJ took your program to the World Music Mixing Expo and rocked the house, with your name in lights! By using classes for the widgets and creating an object oriented program, you made your good program (and the DJ's performance) great.

Object orientation is meant to help you create complex programs with very little code. A lot of languages use object orientation, and not just for graphical user interfaces. You can use objects to build web applications or simulators or games. Any time you need to write an advanced program but don't want your code to turn into a tangled mess of spaghetti, object orientation can come to the rescue!


You got to the end of the book! And what a great journey it's been. You've ruled with control statements. You've powered-up your programs with modular code. You've made graphical user interfaces that sing and, finally, you took your coding skills to the next level with object orientation.

Well done!

Your Programming Toolbox

You've got Chapter 10 under your belt. Let's look back at what you've learned in this chapter:

* Created tall mtt>al,zrrS

Python Tools that Contain other widgets and help to keep the widgets together grouped).

* d,aS; ' *keY™d introduces a new ¿lass definition.

that is called automatically on object Creation. J

* fj r,«ih°ds hdve a sPeiia' liable ^led "self" that is set to the current object

* Adding "self." to the start of a variable *eans it belongs to the Current object go forth and program

Leaving town...

It's been great having you here in Codeville!

We're sad to see you leave, but there's nothing like taking what you've learned and putting it to use. You're just beginning your programming journey and we've put you in the driving seat. We're dying to hear how things go, so drop us a line at the Head First Labs web site, www.headfirstlabs.com, and let us know how programming is paying off for YOU!

appendix i: leftovers

Was this article helpful?

0 0

Post a comment