

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Programming Languages; Subject: Computer Science; University: University of Texas - San Antonio; Term: Spring 2008;
Typology: Assignments
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Note: If you collaborated with your classmates or used their notes, please note which classmates you collab- orated with. If you use an external source, besides the text book, lectures, notes provided by the instructor, and your own intellect, please cite that source. Use quote marks if you are quoting material word-for-word from any source (including the text book).
Simula (Chapter 11 )
(a) What was the first Object-Oriented language? (b) In what decade was it created? (c) Who designed it? (d) For what purpose was it designed?
(a) What features does Simula 67 have that Algol 60 did not have? (List four.) (b) What features of Algol 60 were left out of Simula 67? (List four.) (c) What are coroutines?
(a) What is a class in Simula 67? What Algol 60 entity did it evolve from? (b) What is an object in Simula 67? What implementation construct did it evolve from? (c) Where are objects allocated in Simula 67?
(a) Which of the “four basic object-oriented concepts” was missing from Simula 67? (b) What is a “prefixed” class? How are they declared? What process is used to create an object of such a “prefix class?” (c) In Simula 67 , if B is a subclass of A, a is a variable of type ref(A) and b is a variable of type ref(B), what can happen if a program assigns the contents of a to b? (There are two possibilities. Describe them both and under what circumstance each can happen.)
Do exercise 11. 1 on p. 327 ff in Mitchell. But note that there is a typo and the first line of the code should read: ref(Point) r; instead of ref(Point) p;.
SmallTalk (Chapter 11 )
(a) Was SmallTalk an incremental extension of Simula 67? Why or why not? (b) In SmallTalk, everything is what? (c) What are all operations in SmallTalk? (d) SmallTalk is not statically typed. i. What other language(s) have we studied that shares this attribute? ii. What does subtyping mean in the absence of a static type system? Is it connected to inheritance? If it is, how so? If it is not, why not?
(a) Where was SmallTalk invented? (b) What was Dynabook? (c) What was SmallTalk intended to be for Dynabook?
Give definitions for the following terms as they are used in the SmallTalk community: object, class, subclass, selector, message, method, instance vari- able.
(a) What does Mitchell say that advocates of object-oriented languages re- ally mean when they speak of polymorphism? (b) Give an example of SmallTalk code for which the same “message” will result in two different “methods” being executed. (You may assume that Point and ColoredPoint exist as shown in Figures 11. 2 , 11. 3 , 11. 4 , and 11. 5 of Mitchell.) (c) Describe how SmallTalk finds the correct method to be executed and what runtime structures it uses to do so.
Do exercise 11. 4 on p. 330 ff in Mitchell.