UW-Madison CS 302 - Chapter 17 – Object-Oriented Design

Unformatted text preview:

Chapter 17 – Object-Oriented DesignChapter GoalsSoftware Life CycleSlide 41. Analysis2. Design3. Implementation4. Testing5. DeploymentExamplePerfect WorldWaterfall ModelProblems with Waterfall ModelWhat’s the flaw?Spiral ModelSpiralSlide 17Extreme ProgrammingSlide 19Slide 20Surprising resultsDiscovering ClassesSlide 23Slide 24PowerPoint PresentationExample: InvoiceKey pointsKey PointsSlide 29BehaviorCRC CardSlide 32CRC  DesignRelationships Between Classes3 relationshipsInheritanceSlide 37AggregationAggregation vs. InheritanceSlide 40Slide 41Slide 42DependencySlide 44Slide 45Class DiagramAttributes and Methods in UML DiagramsAggregation and AssociationChapter 17 – Chapter 17 – Object-Oriented Object-Oriented DesignDesignChapter GoalsChapter GoalsTo learn about the software life cycle To learn about the software life cycle To learn how to discover new classes and methods To learn how to discover new classes and methods To understand the use of CRC cards for class To understand the use of CRC cards for class discovery discovery To be able to identify inheritance, aggregation, and To be able to identify inheritance, aggregation, and dependency relationships between classes dependency relationships between classes To master the use of UML class diagrams to To master the use of UML class diagrams to describe class relationships describe class relationships To learn how to use object-oriented design to build To learn how to use object-oriented design to build complex programs complex programsSoftware Life CycleSoftware Life CycleSoftware Life Cycle: all activities from Software Life Cycle: all activities from initial analysis until obsolescence initial analysis until obsolescence Formal process for software developmentFormal process for software developmentDescribes phases of the development Describes phases of the development process process Gives guidelines for how to carry out the Gives guidelines for how to carry out the phases phasesSoftware Life CycleSoftware Life Cycle1.1.Analysis Analysis 2.2.Design Design 3.3.Implementation Implementation 4.4.Testing Testing 5.5.Deployment / OperationDeployment / Operation1. Analysis1. AnalysisDecide Decide whatwhat the project is suppose to do, the project is suppose to do, what the goal of the final product iswhat the goal of the final product isDo Do NOTNOT think about think about howhow the program will the program will accomplish tasks accomplish tasks Output of this phase - requirements Output of this phase - requirements document document Describes what program will do once completed Describes what program will do once completed Example – Example – User manual: tells how user will operate program User manual: tells how user will operate program Performance criteria (will complete X tasks in Y time)Performance criteria (will complete X tasks in Y time)2. Design2. DesignPlan for implementationPlan for implementationDecide what structures will best suit your taskDecide what structures will best suit your taskIn object-oriented programming, this is In object-oriented programming, this is choosing the classes and methods to use (and choosing the classes and methods to use (and create)create)Output: Classes and methods descriptionOutput: Classes and methods descriptionUsually diagramed using UML, can use CRC cardsUsually diagramed using UML, can use CRC cards3. Implementation3. ImplementationActual coding part of the processActual coding part of the processEdit Edit  Compile Compile  Run RunOutput: Completed programOutput: Completed program4. Testing4. TestingRun tests to verify the program works Run tests to verify the program works correctlycorrectlyRemember the two main types of Remember the two main types of testingtestingUnit TestingUnit TestingSystem TestingSystem Testing Output: a report of the tests and their Output: a report of the tests and their results results5. Deployment5. DeploymentAKA Operation, MaintenanceAKA Operation, MaintenanceUsers install program Users install program Users use program for its intended Users use program for its intended purpose purpose Bug fixesBug fixesNew featuresNew featuresExampleExampleAnalysis – the specs we provideAnalysis – the specs we provideDesign – We provided for first four Design – We provided for first four assignments, what you did for A5assignments, what you did for A5Implementation – the code you write to Implementation – the code you write to solve the specssolve the specsTesting – PathTester, Testing – PathTester, BankAccountTester, etc.BankAccountTester, etc.Deployment – TAs using your program Deployment – TAs using your program on sample runs. Our reaction is your on sample runs. Our reaction is your gradegradePerfect WorldPerfect WorldIn a perfect world, everything would In a perfect world, everything would flow perfectly in this processflow perfectly in this processOutput from one phase signifies it is Output from one phase signifies it is complete and can start the next phasecomplete and can start the next phaseDoesn’t really workDoesn’t really workYou’ve probably noticed thisYou’ve probably noticed thisWas anyone’s A5 perfect?Was anyone’s A5 perfect?Have your tests every worked Have your tests every worked completely?completely?Waterfall ModelWaterfall ModelProblems with Waterfall Problems with Waterfall ModelModelSpecs usually have flawsSpecs usually have flawsContradictionsContradictionsNon-thorough (what needs to happen on Non-thorough (what needs to happen on bad input?)bad input?)Design too complicated, Design too complicated, implementation flawedimplementation flawedTesting incompleteTesting incompleteWhat’s the flaw?What’s the flaw?Customer didn’t know what to expectCustomer didn’t know what to expectHow can you fully specify what the How can you fully specify what the program needs to do without seeing it?program needs to do without seeing it?Analogous to the edit-compile-run Analogous to the edit-compile-run cyclecycleNever get it right the first time, have to Never get it right the first time, have to iterate back to prior phasesiterate back to prior phasesSpiral ModelSpiral ModelBreaks development process down Breaks development process down into multiple phases into multiple phases Early phases focus on the Early phases


View Full Document

UW-Madison CS 302 - Chapter 17 – Object-Oriented Design

Download Chapter 17 – Object-Oriented Design
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Chapter 17 – Object-Oriented Design and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Chapter 17 – Object-Oriented Design 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?