View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Final Exam Review - Fall 2006/Spring 2007

Comment on this page Here: Final Exam Review Comments - Spring 2007

1. Design Process
This question looks for you to take a basic problem description and create a design following the steps we learned in class. Example:
Design a simple appointment scheduling system. Users maintain a personal calendar of their appointments. If someone wants to schedule a meeting, the system checks the calendars of all registered users and finds a date/time when the meeting could be held. The system emails all participants of the meeting and adds the appointment to their personal calendars. Users can unattend a meeting by removing the appointment from the calendar. Users can also manually schedule an appointment

What are trust boundaries and why are they important? How would trust boundaries apply to the above example?

2. Smalltalk Coding
a. Design a method for determining whether a given string is a palindrome (a string reading the same in each direction like "radar" or "able was i ere i saw elba". Write the method and identify the receiver (what class would this be in?
b. Identify the sequence of messages and message type, parameters and receivers for the following statement:
Transcript show: (3 + 5) odd.

3. Design Principles
Be able to apply design principles to given problems. Given the Java code below (ignore syntax errors, this code represents design ideas):
public class Message {
public static final int LOGIN = 1;
public static final int REGISTER = 2;
public static final int DISCONNECT = 3;
public int type;
public String payload;

public class MoreMessages extends Message {
public static final int CHAT = 4;
public static final int MOVE = 5;

public interface IServer {
public void acceptConnection();
public void disconnect();
public void sentTo(User u, Message m);
public void sendToAll(Message m);
public void handleMessage(Message m);

public class Server implements IServer {
public void acceptConnection(Socket s) {
//accept stuff and set up user
public void handleMessage(Message m) {
assert (m.type < 4);
switch(m.type) {
case LOGIN: //do stuff
case REGISTER: //do other stuff
case DISCONNECT: //do some other stuff
public void sendToAll(Message m) {
UserManager um = UserManager.getInstance();
for (User u : um.getUsers()) {
//other methods follow...
a. open/closed: How could the above code be improved by applying this principle?
b. Liskov Substitution Principle: Does the MoreMessages class meet this principle? If not what could you change?
c. Law of Demeter: Does the method sendToAll in class Server comply with Law of Demeter? If not, how would you fix it?
d. What design pattern does UserManager appear to implement (in method sendToAll).
e. Single Responsibility Principle: Does class server meet this principle? If not, what would you do to improve the design?
f. Interface Segregation Principle: Look at the interface IServer. Does this comply with the interface segregation principle? If not, what would you do to correct it?
g. Packaging Principles: Would you put all the code above into the same package or not? Explain...
h. Acyclic Dependency: Why would you want to avoid cyclic dependencies in your code (two packages who directly use methods in each others classes). How could you break those dependencies?

4. Design Patterns and Frameworks
a. What is the difference between a design pattern, a framework and an architectural style?
b. What are hotspots and frozen spots in a framework?
c. How might design of a Framework differ from the design of an application?

5. Virtual Machines and Garbage Collection
a. Why do most of the new languages introduced (C#/.Net and Java) use Virtual Machines? (Think about portability, memory management, security, etc)
b. Explain basic garbage collection wrt Reference counting and Mark and Sweep. How does Mark and Sweep correct problems with reference counting?
c. How does generational garbage collection help improve collection efficiency?

6. User Interface Design
a. How would you design the user interface for a new business application? What precautions would you take a developer to ensure the design is "correct"?

7. User Interface Evaluation
a. Given that you have designed the new application interface, how would you evaluate it. Pick one of the techinques we covered in class and discuss its use in evaluation.
b. When might one UI eval be chosen over another? (which require users, which require experts, which can be done by the developers themselves?)

8. UML
a. Draw the UML Class Diagram for the following description:
The automated Vegas system has two types of games with different rules: poker and slots. Each game in the system keeps track of how much money it has available. Games also sound an alarm if they are won. Each game can compute at any instant the total payments it has made. Games are operated by a single player. Each player is provided with an ID Card which has a unique number and a maximum line of credit (in Dollars). A game play for slots is authorized by using the card with the machine. A poker game is played with up to 5 other poker machines. Poker can also be played alone.
b. Draw the UML Sequence Diagram for the following description:
A customer wants to make a reservation at a hotel. The use case gives the following sequence: Trigger: A customer requests a reservation giving the hotel name and credit number. The system routes the request to the correct hotel. If a room is available the room is booked and the customers credit card is charged. If the room is not available, the system does nothing. The use case diagram has an external actor called Customer. The class diagram has 3 classes: Switch with method RequestReservation (Location, CardNo) : Success ; Hotel with methods RequestReservation(Location, CardNo) : Success and chargeCard() ; and RoomManager with methods isRoomAvailable():Boolean and bookroom().

9. Refactoring
a. What is refactoring?
b. What are "bad smells"?
i. Duplicate Code?
ii. Long Method?
iii. Divergent Change?
iv. Feature Envy?

10. Agile Processes
a. What is test driven development (TDD)?
b. What is the relationship of SUnit to TDD and Refactoring?
c. What is the main characteristic of timeboxed sprints in SCRUM?
d. What is pair programming? Why do proponents claim this improve software development?

11. Design Reviews / Architecture Analysis
a. What is the primary way we determine the "goodness" of one design or architecture over another?
b. What is the standard layered architecture for business systems?
c. How do scenarios relate to evaluating the "goodness" of our design?

12. Language Selection
You are going to implement a system supporting a company on-line ordering system. The system runs on the web through a client interface and has a database backend. The most important features are ability to interface with the database system, run in a web browser, availability of on-line resources and familiarity of the development team. Pick 3 languages you know something about (like Java, Php and This is not a test on whether you know the features of the language but to see if you can apply the decision matrix to decide on the "best" language.

13. RDD and Stereotypes
Be able to assign the appropriate stereotypes to the design in part 1
Be able to distinguish a data-driven, event-driven and Responsibility-driven design.

Link to this Page