|

Addison-Wesley / Prentice Hall

Computer Science

My Instructor Resource Center :  Log in or request access

On to Smalltalk
Patrick Henry Winston

ISBN-10: 0201498278
ISBN-13:  9780201498271

Publisher:  Addison-Wesley
Copyright:  1998
Format:  Paper; 320 pp
Published:  09/03/1997
Status: Available on Demand   What's this?


Suggested retail price: $52.00
Buy from myPearsonStore



This book is written in the same clear and concise style that has made Winston's Java, C++, C, and LISP books popular among students and programmers who want to add new languages to their repertoires. Following the unique and well-received approach developed in his other books, the author here gets readers up and running quickly and effectively in Smalltalk. Each easily digested section of the book adds new capabilities to a short, yet representative Smalltalk program, and natural questions that arise in learning a new language are effectively answered in a natural order. Much of the book applies to all versions of Smalltalk; where a specific interface is needed, the examples refer to Smalltalk Express, a version of Smalltalk freely available on the Web from ParcPlace Systems. Throughout the book, Winston shows why Smalltalk is the language of choice when you need power tools for writing object-oriented programs or for building graphical user interfaces. 1. How this Book Teaches You the Language.

Why you should learn Smalltalk.
Methods versus functions.
Programming idioms and programming principles.

2. How To Experiment Using the Workspace and the Transcript.
The workspace and the transcript.
Expressions, receivers, messages, and answers.
Methods and arguments.
Unary, binary, and keyword methods.
Method precedence.
Expression separation.
Strings.
Patterns and instantiation.

3. How To Write Arithmetic Expressions.
Arithmetic messages.
Integer, floating-point, and rational numbers.
Absence of special precedence conventions for arithmetic.
Number-class conversion.

4. How To Define Simple Methods.
Method definition.
The self object.
Returning from methods.
Blank insensitivity and case sensitivity.
Message cascading.
String concatenation.
Comments.

5. How To Define Methods with Parameters.
Arguments and parameters.
Parameters and local scope.

6. How To Perform Tests using Predicates.
Equal and not equal.
Greater than and less than.
Negation.
Class-membership predicates.

7. How To Write Conditional Expressions.
Boolean expressions.
ifTrue: and ifFalse: messages.
Blocks.

8. How To Combine Boolean Expressions.
& and |.
and: and or:.

9. How To Introduce Local Variables.
Local-variable initialization and assignment.
The role of nil.
Local scope.

10. How To Benefit from Procedure Abstraction.
Making programs easier to reuse, read, and debug.
Making programs easier to augment, improve, and change.

11. How To Create Classes and Instances.
Instance variables, setters, and getters.
Derived attributes.

12. How To Define Classes that Inherit Instance Variables and Methods.
Subclasses and superclasses.
Inheriting instance variables and methods.
Method overriding.
Class-membership predicates.
Polymorphism.

13. How To Define Instance-Creation Methods.
Instance-creation methods and initializors.
Definition of new versions of new.

14. How To Benefit from Data Abstraction.
Hiding implementation details.
Making programs easier write and maintain.

15. How To Design Classes and Class Hierarchies.
Explicit representation.
The modularity principle.
The no-duplication principle.
The look-it-up principle.
The is-a versus has-a principle.

16. How To Write Iteration Statements.
Iteration expressions.
whileTrue: and whileFalse: expressions.
timesRepeat: expressions.

17. How To Write Recursive Methods.
Methods that use themselves recursively.
The base part and the recursion part.
Recursion versus iteration efficiency.

18. How To Store Values in Class Variables.
Class variables and class-variable access.
Class-variable setters and getters.

19. How To Store Values in Dictionaries.
The Smalltalk dictionary.
Creation of new dictionaries.
Pool dictionaries.

20. How To Work With Arrays.
Manipulating arrays of numeric elements.
Iterating with elements as parameter values.
Iterating with numeric indexes as parameter values.
Combining array elements with inject:into:.
Arrays of arrays.

21. How To Work with Ordered Collections and Sorted Collections.
Ordered collections of elements.
Iteration over ordered collections.
Bags and sets.
Sorted collections and sort blocks.

22. How To Create File Streams for Input and Output.
Creating file streams.
Reading strings, integers, and floats from input streams.
Writing to output streams.
Closing streams.

23. How To Work with Characters and Strings.
Strings and characters.
Reading lines from files.
Extracting characters from strings.
Converting strings to streams.

24. How To Produce Formatted Text.
Understanding field widths and padding characters.
Determining the length of a string.
Creating strings with specified length and filler.

25. How To Use Sorted Collections in Simulations.
System simulation.
Event queues.
Application classes.

26. How to Work with Dates and Times.
Time and Date objects.
Time and date creation, manipulation, and comparison.
Use of dates in simulations.

27. How To Define Binary Methods.
Defining binary methods.
Creating new classes for numberlike objects.

28. How to Use Debugging Tools.
The walkback window.
The debugger.
The inspector.
The stepper.
Senders and implementers.

29. How to Program Defensively.
Indicating definitions are expected.
Defining class predicates.
Announcing errors.

30. How to Exchange Software.
Absence of text files.
Filing in and filing out.
The chunk-file format.

31. How To Create Points and Rectangles.
Screen coordinate system.
Points and rectangles.

32. How To Draw Lines and To Display Text in Windows.
View managers, top panes, and graph panes.
The createViews method.
The when:perform: method.
Pens, lines, and displaying text.

33. How To Use the Graphics Context to Alter Appearance.
Using pens and graphics contexts.
Changing colors, widths, and fonts.
Drawing plain and filled polygons.

34. How To Use List Boxes to Select Instances.
Creating list boxes.
Loading list boxes with elements.
Determining which element has been selected.

35. How To Connect Together Display Elements.
Sending messages to named views.
Broadcasting messages to all views.

36. How To Display Menus and File Dialog Windows.
Menu items, menus, and menu bars.
Access to files via file dialogs.

37. How To Develop a GUI using a GUI Builder.
Entering the GUI builder.
Installing graphical elements.
Sizing and alignment.
Understanding events and callbacks.

38. How To Work with a Commercial Smalltalk.
Understanding categories and protocols.
Filing out categories and protocols.
Reading and writing file-stream distinctions.

39. How To Work with the Model—Viewer—Controller Paradigm.
Change and update messages.
Dependent parts and views.

40. How To Use VisualWork's Value Holders and Aspect Adapters.
Using value holders to hold values.
Using aspect adapters to translate messages.

41. How To Use VisualWorks To Build Applications.
Application models.
VisualWorks GUI Builder.

42. How To Use VisualWorks To Build Viewers and Controllers.
Defining new viewers.
Defining new controllers.

Appendix A: The Calorie Application.
Appendix B: Packaging Applications for Users.
Appendix C: The VisualWorks GUI Builder.
Appendix D: The VisualWorks Drawing Methods.
Colophon.
Index. 0201498278T04062001

About Patrick Henry Winston

Well-known author Patrick Henry Winston teaches computer science and directs the Artificial Intelligence Laboratory at theMassachusetts Institute of Technology.



0201498278AB04062001

Learn the language with power tools for program writing and interface building This book is written in the clear and concise style that has made Winston's Java, C, C++, and Lisp books popular among programmers who want to add new languages to their repertoire. Using this book, you learn Smalltalk quickly and effectively, and you learn why Smalltalk is the language of choice when you need power tools for writing object-oriented programs and building graphical user interfaces.

The Knowledge You Need

Each section adds new capabilities to a short, yet representative Smalltalk program. One such program displays the calorie content of a food selected by a button click.


As you see the program evolve, you learn how to experiment using the workspace and the transcript, benefit from procedure abstraction, define classes that inherit instance variables and methods, benefit from data abstraction, design classes and class hierarchies, store values in class variables, store values in dictionaries, work with arrays and collections, use time-sorted collections in simulations, work with dates and times, program defensively, exchange software, create points and rectangles, draw lines and display text in windows, connect display elements, display list boxes, menus, and file dialog windows, develop a graphical user interface using a GUI builder, work with an industrial-strength smalltalk, work with the model-viewer-controler paradigm, and much, much more.

Winston's proven approach
  • Based on extensive teaching experience
  • Features easily digested segments
  • Illustrates ideas via short, yet complete, programs
  • Answers your natural questions in a natural order
  • Stresses principles of good programming practice
  • Recapitulates key points as if--then rules


0201498278B04062001

Interwrite Personal Response System
EduCue, Addison-Wesley & Benjamin Cummings
©2004 | Addison-Wesley | Electronic Supplement | Instock
ISBN-10: 0321267354 | ISBN-13: 9780321267351


Pearson Higher Education offers special pricing when you choose to package your text with other student resources. If you're interested in creating a cost-saving package for your students contact your Pearson Higher Education representative.