design - Coming up: What is the design phase? Design (Ch 8...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Coming up: What is the design phase? Design (Ch 8 and Ch 12) Dan Fleck CS 421 George Mason University What is the design phase? • Analysis phase describes what the system should do • Analysis has provided a collection of classes and descriptions of the scenarios that the objects will be involved in. These functions are clustered in groups with related behavior. • The design phase is to work out how the system should do these things. This is the goal of the design phase. Coming up: Analysis --> Design Oversimplification Analysis Classes Attributes Operations Relationships Behavior Design Objects Data Structs Algorithms Messaging Control Coming up: The Design Spec The Design Spec Architecture Design - • Layers of the software (e.g.model, view, controller (MVC)) • Categories of classes (e.g. UI, Business logic, interfaces) Component design - • Description of classes/methods/algorithms • State machines for classes • (Think: individual classes) UI design • sample screens • UI guidelines/standards we’re using • detailed description of how UI components work Data design - • database design • data structures we’re using. Coming up: The Design Spec The Design Spec But really, how do I create a design spec? Find examples and use what you think is helpful from them! http://www.mhhe.com/engcs/compsci/pressman/graphics/Pressman5sepa/common/cs2/design.pdf http://www.cmcrossroads.com/bradapp/docs/sdd.html Coming up: The Design Spec Applied Design We know what to do now, but that is just a set of documents.. How do we create a GOOD design? Coming up: Good Design Good Design • Design Principles – What should you try to do. • Design Patterns – How have people done it before you? • Design Metrics – How do you know you have done it well? Coming up: Single Responsibility Principle Single Responsibility Principle • Each class should have a single overriding responsibility (high cohesion) • Each class has only one reason for why it should change Coming up: Single Responsability Example Single Responsibility Example Coming up: Example: Paperboy and the Wallet Student name address grades fileToSave calculate GPA storeStudent Why might this class definition change? Why might this class definition change? student name student name student address student address grades grades which file we store the information in which file we store the information in Example: Paperboy and the Wallet Customer getFirstName() getLastName() getWallet() Wallet addMoney(int a) subtractMoney(int a) countMoney() PaperBoy’s getPayment method: payment = 2.00; // “I want my two dollars!” Wallet theWallet = myCustomer.getWallet(); Wallet theWallet = myCustomer....
View Full Document

This note was uploaded on 03/26/2012 for the course CS 321 taught by Professor Kinga during the Spring '12 term at George Mason.

Page1 / 40

design - Coming up: What is the design phase? Design (Ch 8...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online