Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Fall 2004 Exam 2 Review Page
In the third Clock user interface, a Clock instance forms the model and a ClockText instance forms a view. Describe the sequence of messages that occur when a second of time passes by, such that the Clock is updated and the updated time is displayed by the ClockText. Hints: Think about self changed:, nextSecond, update:, and dependents.
Put your answers/comment/questions at Fall 04 Midterm 2 Review: Changed/Update mechanism
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 Fall 04 Midterm 2 Review: Class Diagram
- 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 Fall 04 Midterm 2 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 Fall 04 Midterm Review: Design Critique
Designing the Segway Palm
Palm has just announced a new kind of handheld
device designed specifically for attaching to the Segway
Personal Transportation device
SegPalm will feature a map with GPS (``Global Positioning
System'') for finding your way around town, an MP3 player and FM
radio, a cellphone, and a Zagat's guide to the restauraunts around
town, as well as the traditional appointment book, to-do list, and phonebook
Palm wants some of these features to interoperate. For example:
- The single speaker jack should be internally connectable to
either the radio source or the MP3 source. The volume control effects
the speaker jack directly, while the band selector effects only the
radio source and the clip selector effects only the MP3 source.
- Map objects will be used by the GPS locator (e.g., to
tell you where you currently are), by the Zagat's guide (e.g.,
to show you where the nearest Starbuck's or Waffle House is),
and by the address book (e.g., to show you where your Aunt
Millie's house is and the quickest way to get there). This
means that the map needs to be indexed both by global GPS
coordinates and in terms of street addresses, e.g., the maps
have to know the GPS coordinates associated with 800 Atlantic
Drive. Locations in the address book and in the Zagat's guide can be
specified in terms of either GPS coordinates or in terms of street
addresses, and the Map objects have to handle translations between them.
A single Location will appear on multiple Maps, and if the Location is
asked for its coordinatesInGPS or coordinatesOnStreet, it should know
one of those and be able to ask any of its Maps for the other. A Map
should know how to map any Location to its own graphical
representation, such that the Map can highlightFor any Location.
- Draw a UML class diagram for the interactions between Maps,
Locations, the address book, and the Zagat's guide, including any
additional objects you think are necessary. You must account for all
of the functionality described in this problem, but you needn't add
any other (e.g., you don't have to handle the address book user
interface). You do need to show attributes and services that would be
necessary to implement the given functionality. Describe
briefly what each of your services would do.
- Identify one design pattern that would be useful in this
problem. Explain how it would be useful, and identify specific
classes that you would use in a design for this problem that would
correspond to the design pattern participant objects.
- Palm is using Squeak to implement the SegPalm.
Imagine that you have an ordered collection errands of
Location objects that represent places to which you have to
run errands. You have a Map gridMap on which all the
Locations appear. You are to write workspace code:
- To tell gridMap to highlightFor each of these
- To ask each of the errands locations for its
streetname (assume given, returns a string with the name of the
street). For each street containing more than one errand
location, print to the Transcript a message announcing ``There is
more than one errand on street: '' with the street name.
Post comments, discussion, answers at Fall 04 Midterm 2 Review: Segway Palm.
You are going to be designing a suite of tools for space scientists. Your scientists are going to need to work with three kinds of documents:
- Data Collection Documents: Containing live satellite data in a form appropriate for doing numeric calculations with.
- Data Visualization Documents: Does 2-D and 3-D graphs of satellite data linked to it.
- Data Planning Documents: For organizing modules both on the satellite and off for gathering and processing sensor data.
a. Explain how one (your choice which one) Design Pattern would be useful in building this application. Draw a UML class diagram of the portion of your design where the design pattern would be useful. (Note: You are not drawing the whole class diagram, nor are you showing me the structure of the Design Pattern. Rather, you are showing me a few classes in your application whose design would be based on the Design Pattern you've selected.)
b. The Space Scientists think this object-oriented stuff is just silly. "Fortran was good enough for my advisor and for me and for my students," they say. "Why not just use that?" What are the advantages of object-oriented design and programming for this problem?
Post comments, discussion, answers at Fall 04 Midterm 2 Review: Tools for Space Scientists
a. Factory Method and Abstract Factory design patterns are quite similar. How are they similar and how are they different?
b. How are the Adapter and Bridge patterns similar and different?
Post comments, discussion, answers at Fall 04 Midterm 2 Review: Design Patterns
Give short answers to these questions regarding simulations:
- Explain the difference between discrete and continuous simulation models
- For implementing a discrete simulation model, what are the relative advantages of using a ticking clock versus a clock driven by an event queue?
Post comments, discussion, answers at Fall 04 Midterm 2 Review: Simulations
1. Object-Oriented Testing
Answer each of the following briefly:
(a) What do we define as a unit when we are doing unit testing of an O-O program?
(b) What impact does the encapsulation that is fundamental to object-oriented programming have on testing?
(c) How does use of the SUnit and Junit tools help deal with a problem you described in your answer to (a)?
(d) Suppose you are designing tests for a subclass S of a class C and the you have already tested C. Under what conditions do methods of C have to be retested in the context of S?
Post comments, discussion, answers at Fall 04 Midterm 2 Review: O-O Testing
Link to this Page