This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without the express written permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for redistribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Low-level or detailed design is critical despite libraries and componentsPre-existing classes need to be understood and organizedSome, if not all code, is generally still needed to instantiate new classes
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
ElementsClassesObjects – instance of a classAttributes – describes dataStates – describes object at specific point in time via an attributeMethods – processes to be performedMessages – used to get an object to perform a method
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Same message triggers different methods in different objectsDynamic binding means specific method is selected at run timeImplementation of dynamic binding is language specific
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
polymorphism refers to a programming language's ability to process objects differently depending on their data type or classit is the ability to redefine methods for derived classes
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Given a base class shape, polymorphism enables the programmer to define different circumference methods for any number of derived classes, such as circles, rectangles and triangles. No matter what shape an object is, applying the circumference method to it will return the correct results
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Two inherited attributes or methods have same name and semanticsTwo inherited attributes or methods have different name, but same semanticsTwo inherited attributes or methods have same name and different semantics
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Good No Direct Coupling – no callsData – passes variable uses allStamp – passes object uses someControl – passes control variableCommon or Global – outside object
Bad Content or Pathological – method of one object refers to inside method of another (often illegal)
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Table of user preferences – global dataCan be changed by a number of objectsIe values might be changed between the end of one ‘run’ and the beginning of the next ‘run’
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Sales tax percent stored in separate tableCalculate sales tax at 6% for one itemAnother object changes Sales tax percentNext items is calculated with 7% sales tax
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Refers to the situation where a method references an attribute“get product number” refers to attribute in ‘product’ classIf ‘product class’ changes the attribute name, the method must change
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
A set of constraints and guaranteesWritten in natural language, structured English, pseudocode, or formal language – can be modeled in UML with OCL (Object Constraint Language)
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design
Date :: Tomorrow() pre: year < 9999 or (year = 9999 and month < 12) or (year = 9999 and month = 12 and day <31) post: if day@pre < 31 then day = day@pre + 1 else if month@pre < 12 then month = month@pre + 1 day = 1 else year = year@pre + 1 month = 1 day = 1 end if end if
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design