1 / 25

CS 509 Design of Software Systems

CS 509 Design of Software Systems. Lecture #7 Thursday, Oct. 16, 2003. Class Format for Today. Term Project administration Return Quiz #3 Questions Review of Chapter 7 Preview of Chapter 9 Get Student Feedback: How is this course going so far?. MC Project & Quiz #3.

aderyn
Download Presentation

CS 509 Design of Software Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 509Design of Software Systems Lecture #7 Thursday, Oct. 16, 2003 CS 509 - WPI

  2. Class Format for Today • Term Project administration • Return Quiz #3 • Questions • Review of Chapter 7 • Preview of Chapter 9 • Get Student Feedback: • How is this course going so far? CS 509 - WPI

  3. MC Project & Quiz #3 • Turn in Phase 3 (Design) document • Hand out Phase 4 Assignment • Return Quiz #3 • Solutions available on course web site CS 509 - WPI

  4. Questions? • About Term Project • From last week’s class • From the reading • Anything else? CS 509 - WPI

  5. Chapter 7 Object Design CS 509 - WPI

  6. Object Design • Focus: • Individual objects & hierarchies • Interfaces • Challenges: • Increasing reuse wherever possible • Eliminating as many dependencies as possible • Optimizations to address performance criteria such as response time or memory usage CS 509 - WPI

  7. Object Design Activities • Refine analysis & system design models • Identify new objects • Close the gap between application objects and off-the-shelf components: • Identify custom objects • Adjust of off-the-shelf components • Specify interfaces between classes CS 509 - WPI

  8. Service Specification • Specify subsystem services identified during system design: • Class interfaces • Operations, arguments • Type signatures • Exceptions • Find missing operations and objects CS 509 - WPI

  9. Component Selection • Find, adapt and use off-the-shelf components • Class libraries & 3rd party packages • Data structures • Services • May need to adjust: • Wrap with custom objects • Refine using inheritance • Buy vs. build trade-offs CS 509 - WPI

  10. Restructuring • Manipulate system model to increase code reuse or meet other design goals • Maintainability, readability, understandability • Merge similar classes • Collapse simple classes into attributes • Split complex classes into simpler ones • Rearrange classes & operations to increase inheritance relationships CS 509 - WPI

  11. Optimization • Address performance requirements: • Algorithms to improve speed or memory usage • Reduce multiplicity to speed up queries • Add redundancy for efficiency • Add derived attributes to improve access time • Rearrange execution order • Open up a “closed” architecture for performance improvements CS 509 - WPI

  12. Figure 7-2. Activities of object design (UML activity diagram). CS 509 - WPI

  13. Object Design Terminology • Application vs. Solution Domain Objects • Types & Signatures • Visibility • Contracts, constraints: • Invariants, Preconditions, Postconditions • Exceptions CS 509 - WPI

  14. Example Object Design Geographical Information JEWEL Modeling System CS 509 - WPI

  15. Layer label WaterLayer RoadLayer PoliticalLayer * * * * Highway SecondaryRoad State County * * River Lake * * * * * * PolyLine Polygon Figure 7-7. Object model for the GIS of JEWEL (UML class diagram). CS 509 - WPI

  16. Layer label getOutline(bbox, detail) Water Layer Road Layer Political Layer elements LayerElement * label LayerElement(polyline) LayerElement(polygon) getOutline(bbox, detail) Highway Secondary road State County River Lake Figure 7-12. Adding operations to the object model of the JEWEL GIS to realize zooming and clipping (UML class diagram). CS 509 - WPI

  17. PolyLine Polygon addPoint(point) addPoint(point) getPoints(bbox) getPoints(bbox) * * Point * * x, y inDetailLevels notInDetailLevels Point(x, y) includeInLevel(level) excludeFromLevel(level) Figure 7-14. Additional attributes and methods for the Point class to support intelligent point selection and zooming (UML class diagram). CS 509 - WPI

  18. Layer +label:String LayerElement +label:String +LayerElement(polyline:PolyLine) +getOutline(bbox:Rectangle2D, detail:double):Enumeration PolyLine +label:String +PolyLine() +getPoints():Enumeration +x, y:double +inDetailLevels:Set +notInDetailLevels:Set +Point(x, y:double) +includeInLevel(level:double) +excludeFromLevel(level:double) 1 +Layer(label:String) elements * +getOutline(bbox:Rectangle2D, detail:double):Enumeration 1 polyline 1 Point * points * Figure 7-15. Adding type information to the object model of the GIS (UML class diagram). Only selected classes shown for brevity. CS 509 - WPI

  19. Managing Object Design • Increased communication complexity • Result of collaboration among many people • Scope of project grows • Consistency with prior information • Revisit analysis & system design decisions • Keep project & design goals in mind • Maintain change history • Ensure documents reflect current state CS 509 - WPI

  20. Preview of Chapter 9 Testing “The software is done. We are just trying to get it to work.” CS 509 - WPI

  21. Opposing Goals of Testing • To ensure/demonstrate proper functioning • To “break” the system, find defects • What constitutes success/failure in each of the above approaches? • Which approach is easier? (Possible?) CS 509 - WPI

  22. Quality Assurance Techniques • Fault Avoidance • Development processes & methodologies • Throughout analysis, design & implementation • Fault Detection • Testing & debugging • After code has been written • Fault Tolerance • Recovery from failures • Post-delivery, run-time activities CS 509 - WPI

  23. Types of tests – Part 1 • Unit tests • Find faults in an individual object • Integration tests • Find faults in a subsystem • Multiple objects working together • System tests • Further integration, all components together CS 509 - WPI

  24. Types of tests – Part 2 • Functional testing • Conformance to functional requirements • Performance testing • Conformance to non-functional requirements • Acceptance & installation testing • Done by client, with support by developers CS 509 - WPI

  25. For Next Time Chapter 9 – Testing Pay special attention to Stubs & Drivers CS 509 - WPI

More Related