Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Summer 2003 Midterm Review
A midterm in 2340 is 4-5 questions like the questions below.
I recommend working together to figure out the solutions. I will check up on the discussions, but I won't provide answers where no answers are posted.
Unless you need to edit/repair something here, do not edit this page! Put your answers on the answer page. If you do edit this page, please be careful with the formatting. Thanks! Barbara Ericson
- What's a class? What's an instance?
- What's the difference between a class and instance method?
- What's the difference between a class and instance variable?
- In the following Squeak code what type of method (class or instance) is "new" and what type is "initialize"?
joe := Box new initialize
Put your answers/comments/questions at Sum2003 Midterm Review: O-O Systems
History of Object Systems
- What is Sketchpad?
- What is Simula?
- What do they have to do with Squeak?
- How did OO ideas get out into the mainstream (out of the research lab)?
- How are Java and Squeak similar and how are they different?
Put your answers/comments/questions at Sum2003 Midterm Review: History of Object Systems
| anArray aString |
anArray := #('abc' 'def' 'ghi','jkl').
aString := ''.
anArray do: [:each |
aString := aString, each.].
Transcript show: aString.
1. What appears on the Transcript ?
2. How many times did the do: loop get executed?
| i test |
i := 1.
test := (i < 10).
[test] whileTrue: [Transcript show: 'hello'.
i := i + 1.].
3. How many times does hello get printed in this example?
Put your answers/comments/questions at Sum2003 Midterm Review: Reading Code
Define each and give an example.
- What is Inheritance?
- What is Delegation?
- What is Polymorphism?
- What is Encapsulation?
- What is the MVC paradigm? (For an example show an example using MVC)
Put your answers/comments/questions at Sum2003 Midterm Review: Definitions
Draw a Class Diagram of a Student Registration System
You have just completed an analysis of a student registration system:
- Students have names, student numbers, and a transcript
- Transcripts list the sections that a student has taken and the grade for each.
- A Section is an offering of a Class that has a time and term associated with it, and a number of students who took the class that quarter.
- A Class has a name, a number (e.g. "CS2390"), and a number of credits associated with it.
Draw a class diagram for these classes.
Put your answers/comments/questions at Sum2003 Midterm Review: Class Diagram
Testing and Refactoring
- What is SUnit and why would you want to use it?
- What is refactoring and why would you want to do it?
- Name one kind of refactoring and the problem it is supposed to solve.
Put your answers/comments/questions at Sum2003 Midterm Review: Testing and Refactoring
- What are some things to consider when developing a UI for K-12?
- What are some things to consider when developing a UI for senior citizens?
- What are ways to test your user interface? Both before the users are involved and after?
- What is a cognitive walkthrough and when is it useful?
- What is wrong with the UI for the clock on page 187?
- What is a process that you could follow for developing a good user interface?
Put your answers/comments/questions at Sum2003 Midterm Review: User Interface
What is wrong with the following and how do you fix it?
- We decided to have one shape class and have a type attribtue which can be "Circle", "Rectangle", "Triagle". We have to case on the type to figure out what to draw. Later we need to case on the type again to output the postscript.
- Boxes need to use a pen so we had Box inherit from Pen.
- We got lots of coding done because we were able to copy code to many different classes.
- We really only needed one "main" class and a couple of helper classes.
- We call the class that edits the image part of the slide "EditBackground".
Put your answers/comments/questions at Sum2003 Midterm Review: Design Critique
- What are CRC cards? Who invented them? What do they show?
- How are CRC cards used?
- Develop CRC cards for the following scenario:
A customer calls a mail order company. A salesperson answers and gets the customer information (including credit card and shipping address). The customer gives the item numbers for the items in the order and the quantity desired of each. For each item number given the salesperson says the item name, price, and checks if the item is in stock. When the customer says that they have no more items to order the salesperson gives the customer the order total, shipping estimate, and confirmation number.
- Create a UML diagram for the design of your solution for the software to handle the mail order system.
Put your answers/comments/questions at Sum2003 Midterm Review: CRC
Links to this Page