Lecture summaries for Software Design and Development Winter 1997 This file is at: http://www.ccs.neu.edu/research/demeter/course/w97-ug/lectures ---------------------------------------------------------------------- Jan. 6 Introduction OO methods Small method problem of OO methods Use adaptive oo method: Demeter Method for design Implementation in Java Class Diagrams Traversals Visitors (a special kind of objects) Reverse engineering of binary tree Java program from hw 1 http://www.ccs.neu.edu/research/demeter/course/w97-ug/hw/1/binary-tree Use file demeter-java-handout1 Understand program and show what is important. Extract class diagram and traversal from Java program. Write Java program in Demeter/Java notation. http://www.ccs.neu.edu/research/demeter/course/w97-ug/hw/1/binary-tree file *.beh ---------------------------------------------------------------------- Jan. 7 Introduction to minimalist OO process Analysis/Design/Implementation Waterfall process versus Spiral process Analysis: use cases, analysis-oriented class diagram Design: Interaction specifications, design-oriented class diagram Impl: methods and class definitions class diagrams in more detail Basic case: construction and alternation classes and edges only Show equivalent in UML class diagram notation Textual notation for those UML class diagrams Class dictionary as an extension of a class diagram with syntax Use *.cd and *.input in: http://www.ccs.neu.edu/research/demeter/course/w97-ug/hw/1/binary-tree Refer to Jack. Explain more of the Java code: packages ---------------------------------------------------------------------- Jan. 9 Defining language and structure of class dictionaries Parsing objects Use homework 2, class graph example. http://www.ccs.neu.edu/research/demeter/course/w97-ug/hw/1/class-graph Counting vertex objects Questions: cardinality constraints in UML, class versus instance variables, interfaces in Java, multiple inheritance for interfaces but not for classes. ---------------------------------------------------------------------- Jan. 13 Theme: Introducing design language for behavior Example used: Count the number of inheritance relationships in a class diagram /proj/adaptive/www/course/w97-ug/hw/1/graph Relate to Java program: To modify the vertex counting program so that it counts inheritance relationships, you had to comment out some code. Expressed at a higher level: you had to bypass certain vertices and edges. Use /proj/adaptive/www/sources/DemeterJava/examples/j-count-inh-rels/design-files-count-inh-relations Introduce bypassing of edges and vertices. Introduce visitors. Show alternative design: traverse to Alternat and count 2. ---------------------------------------------------------------------- Jan. 14 Learning Map: Object-oriented Software Design and Development: Object-oriented Analysis (use cases and class diagrams) Object-oriented Design (class diagrams (grammars), traversals, visitors) Implementation in Java (classes and methods) Goal: reuse of design information Theme: Introduce nested visitors Example: http://www.ccs.neu.edu/research/demeter/course/w97-ug/hw/2/capacity-check Use it to show process from analysis to design and implementation. Use two different languages to define inputs, one designed with class. Design patterns for adaptive object-oriented design: http://www.ccs.neu.edu/research/demeter/adaptive-patterns/pattern-lang-conv We start with: http://www.ccs.neu.edu/research/demeter/adaptive-patterns/pattern-lang-conv/Structure-Shy-Traversal.html See also: http://www.ccs.neu.edu/research/demeter/adaptive-patterns/AOP/ --------------------------------------------------------------------- Jan. 16 Introducing the Visitor Pattern Exploring objects as an example: http://www.ccs.neu.edu/research/demeter/sources/DemeterJava/examples/j-selectively-explore notes in: design-object-exploration class-graph.java How to use the tool Demeter/Java: (assumes you have done the set-up in hw 1) make clean make test after you have changed the *.beh or *.cd or *.input files. Systems has put links in /arch/com/bin and /arch/unix/bin for "java" and "javac", respectively, so I've removed the "java" script in /proj/demsys/demjava/bin. If you're running demjava-compiled programs, please make sure you have "/proj/demsys/demjava/classes" present in your $CLASSPATH environment variable, so the Java VM can find the "demeter.*" classes. (You should probably set it in your ~/.software file.) Please let me know if you're still having problems with any of these scripts, on either SunOS 4 or DEC Alpha. --Doug ------------------------------------------------------------------ Jan. 21 The Visitor Design Pattern from GOF ------------------------------------------------------------------ Jan. 23, Thursday program explanation. Thursday: /proj/adaptive/www/sources/DemeterJava/examples/j-department Ed and Patrick. Terminal-Buffer Rule Repetition-Buffer Rule Prefix-Suffix-Grammar Rule Hw 3 discussion Project discussion ------------------------------------------------------------------ Jan. 27, Monday Program explanation: /proj/adaptive/www/sources/DemeterJava/examples/j-g-displayAsTree/ Charles and Brian. Explain visitors again using: /proj/adaptive/www/sources/DemeterJava/examples/j-basic-visitor/ ----------------------------------------------------------------- Jan. 28, Tuesday Program explanation: /proj/adaptive/www/sources/DemeterJava/examples/j-triples/ Project discussion. ------------------------------------------------------------------ Jan. 30: Johan: Decorator pattern Feb. 3: Johan: Monday: Subtleties of using visitors subclassed off Visitor and traversals. Covered an example program using the Decorator pattern. Feb.4: Viewgraphs are in: http://www.ccs.neu.edu/research/demeter/talks/with-patterns/ubs-talk.ps Feb. 6: Review Feb. 10: Review Feb. 13: Discuss midterm, discuss propagation pattern project, language translation Feb. 17: /proj/adaptive/www/sources/DemeterJava/examples/j-check-TBR1/evolution-steps Feb. 18: --------------- not yet used The structure of the object-oriented design notation. Walk through class dictionary. handout: http://www.ccs.neu.edu/research/demeter/sources/DemeterJava/sourceC++/Java/demjava.cd