CS 160 Lab 7

Architectural and Design Choices

One of the student learning outcomes of CS160 is to “reason about architectural and design choices”. This lab explores the reasoning process.

Your team should read through the proposal that you are to defend and the competing proposal that you should try to prove wrong. After 20 minutes, your team will briefly present its findings. Later, you will be asked to challenge the competing team.

In your presentation, you should be prepared to hand-sketch simple class and sequence diagrams. A class diagram is helpful to give details about the implementation. A sequence diagram is helpful to show that your solution is feasible.

As you defend your choices, you may want to consider these criteria:

Team Assignments

Team Proposal Competing Assignment
Athens, Paris A B
Berlin, Rome, Helsinki B A
London, Vienna C D
Stockholm, Warsaw D C

Terminology

An assignment consists of one or more problems. Students submit a submission to the assignment that consists of responses to each problem. A response may consist of multiple response components.(source files, text files, etc.). Some response components are required, others are optional. A problem is graded by applying one or more checks. There are different kinds of checks (run with given input/output, run against tester class, run and capture screen, etc.)

Proposal A/B

We want to decide how to run the checks. Proposal A is to use the Strategy pattern. Each type of check is a subclass of a strategy class (or maybe interface--your choice). What information would instances of the strategy classes carry? How would the instances be specified and stored? How would the checking happen? What would be involved in adding additional instances? Addiitional types?

Proposal B is to use the Interpreter pattern (does it actually?). Each check is carried out by an Ant script, or maybe a part of an Ant script--your choice. How would a check for a particular problem be specified by the problem designer? How would the checking happen? What would be involved in adding additional instances? Addiitional types?

Propsal C/D

We want to decide how to store student responses.

Proposal C is to store responses in the file system. Proposal D is to store responses in the database, by persisting entity objects.

Your job is to flesh out the details. Consider a typical response consisting of multiple components. Some components are required, so you know their exact names and directories. But there may be others that you didn't necessarily expect. How is the response submitted? How do you know which components have been included? Where do you put them? How can you be sure that your location is unique? How does the compiler find them? What would happen if a grader modified a solution for grading? What if two graders made different modifications? Which design patterns, if any, apply?