CompSci 307 Fall 2021 |
Software Design and Implementation |
This exercise is intended for you to start designing your project without worrying about how it will be implemented. Thus, without implementing any functionality, determine a set of objects and abstractions you think represent elements in the problem and can work together to implement a solution.
Show your progress to a UTA during lab when you think you are finished to get feedback and then push
the initial version of your design in the file, doc/DESIGN_PLAN.md
, to your shared team repository.
As a team, complete the following activities:
Note, while the examples given below are typical of experienced designers using CRC Cards and Use Cases, write yours as a close to Java as possible to make sure you include enough details for us to verify your design makes sense.
Review each person's answers to the planning questions and try to come to a team consensus to start further discussions. Also discuss any issues or concerns anyone has about the specifications or goals of the project.
Discuss the Open-Closed Design Principle and how it might apply to this project by having each person share their interpretation of it and how it might apply to the Game project from the start of the semester if you wanted to add new kinds of elements that had with different kinds of behavior, such as:
Consider the following additional questions as you discuss the basic design elements of the Logo project — they are restricted to the Logo application because it is better to understand one application well then add others rather than trying to do all three at once.
Write a high-level description of the different parts of the project and how they can interact without worrying about the implementation details, such as how the parsing is actually going to be done — understanding that algorithm is not needed for any of this planning.
In other words, without writing any actual implementation code, try to explore trade-offs between several designs and describe the best one in enough detail that other programmers could implement it for you using any data structures or file format they want.
A picture may be helpful to show how your parts are related to and dependent on each other.
After thinking about a problem generally, many people find CRC cards useful to describe a Object-Oriented design because they help make the objects more concrete, the logical relationship between objects explicit, it is easier to understand, evaluate, and modify a design. A CRC card is an index card (which nicely limits how much a class can do and are easy to change and move around to see their relationship visually) that helps you focus on making active objects by answering the following questions for each class:
Here is an example of developing complete CRC cards. However, in this examples, the responsibilities are given in simple English, not as a Java method signature (name, parameters, and return type). Your version must be written as a Java method signature to help provide more details about the flow of the program.
The following scenarios are provided to help test the completeness of your design. By writing the steps needed to complete each case below you will be able to see how effectively your design handles these scenarios and others will be able to better understand how deeply you have considered the basic issues. It may help to role play or draw a diagram of how your classes collaborate to complete each case. For this exercise each step, try to include both the class used and the method used to accomplish the step.
Here are some examples of completed Use Cases. In these examples, the steps are given in English, not as a Java method calls. Your version should be written as a sequence of calls to only those Java methods on your CRC cards to provide more details about the flow of the program.
To make things more interesting, pair up with another team and try to do this part using their CRC cards!