| ||
Student Originated Software 1997-1998
| ||
A Software Engineering Course at The Evergreen State College | ||
|
Student Originated SoftwareObject-Oriented Programming (Smalltalk)Lecture 1aProgramming Language Paradigms....
what are they? (and give some examples...) imperative/procedural functional OO logic & constraint concurrent/distributed
what do we take in account when we select a programming language for a system:
why smalltalk?
-----------
advice:
program (code), and _state_ what do you think it looks like with smalltak? you are adding code dynamically, and creating objects
the smalltalk virtual machine -- interprets code as it comes in "the image" -- where code and object instances are stored implementation (visualworks) the Smalltalk Virtual Machine (your image is its memory) the development environment (your classes + class library)
(this is why ST is so portable!) next week - where these things live....
the language.... naming conventions - height, myHeight; Book, aBook; Employee, anEmployee literals and constants numbers strings symbols and arrays (inspect an array)
constants true, false (vs. True, False) nil UndefinedObject
variables - Smalltalk variables are typeless the temporary variable <origin> - can hold anything! | origin | origin := Date today. origin := 5. origin := 'nature'. origin := origin.
(next week - class varibles)
sending messages MyStorageSystem initialize. aSquare increaseSizeBy: 2. wendy employ: 'Shannon' as 'a Smalltalk Programmer' Database open: 'students.dat' using: key rwMode: 7.
message separator - '.'
sender, receiver; self.
assignment ^true. Total := net + tax. aSeminar := Seminar with: people size:15. dougsSeminar := aSeminar.
| origin | origin := 3+5. origin := 'apple' . Transcript cr; show: origin.
every message expression has a value.
combining messages. chaining aTriangle height asInteger. unary, binary, keyword unary, binary, keyword; left to right. ()s change order!
MyCollection add: Pyramid new initialize. (you don't need to know what this means to give its eval order)
(book openAtPage: 1+2*3) print
cascading messages diskController reset intialize startRunning. diskController reset; intialize; startRunning.
(most methods return self, usually by default, but not always!) about visual works (minimal subset) launcher (aka main window) workspace browser (to look at classes) the transcript ho1 getting started on smalltalk in the lab (shannon)
demo1 - in class
Transcript cr. Transcript show: 'Hello world!'
what are the messages, what kinds of messages...
demo1 - in lab running visual works HERE
demo2 browsing the class hierarchy SAVING YOUR IMAGE....file-out-as don't save in the default location use a fully qualified file name must use file settings...
|