Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.

Similar presentations


Presentation on theme: "SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin."— Presentation transcript:

1 SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin

2 Reminders Hand in your solutions to Exercise Set 1 (they will be returned). Homework is given in this lecture (see last slide). 4/7/2019 SOEN 343, © P.Chalin,

3 Agenda – Lecture 2a OO fundamentals continued. Design
Delegation, polymorphism. Design “Levels” Methods UML flash: a language for expressing designs. Test Drive Development (TDD) and refactoring – a first demonstration – skipped, ran out of time due to room change delay. 4/7/2019 SOEN 343, © P.Chalin,

4 Java – some details to be read on your own.
Primitive types: include Floating point : float, double. Integral : byte,short,int,long,char. boolean, is not assignment compatible with integral types; explicit conversion required. boolean b = (i == 0 ? false : true); Class types for “boxing”: Float, Double, Byte, … Boolean. E.g. Boolean o = new Boolean(b); 4/7/2019 SOEN 343, © P.Chalin,

5 java.util.Vector Vector class Example of use
Implements a growable array of objects. Example of use String s = …; Vector v = new Vector(); v.add(s); // adds to end String t = v.elementAt(0); v.remove(s); int i = v.size(); List interface ArrayList class 4/7/2019 SOEN 343, © P.Chalin,

6 OO Fundamentals (Exercise Set 2)
Answer Q1 and Q2 of Exercise Set 2 Delegation. Polymorphism. 4/7/2019 SOEN 343, © P.Chalin,

7 Design vs. Requirements and Implementation.
Architectural Detailed 4/7/2019 SOEN 343, © P.Chalin,

8 Design Levels Architectural design Detailed design
. Detailed design Implementation (executable designs) 4/7/2019 SOEN 343, © P.Chalin,

9 Two complimentary approaches to design
Planned Design vs. Evolutionary Design Can we get away with only planned design? 4/7/2019 SOEN 343, © P.Chalin,

10 Evolutionary Design Practices Important characteristics
XP Test driven development (TDD) Do not add code unless you have a test failing … Important characteristics “Full” automated test suites Refactoring Help us learn detailed design idioms, patterns, … 4/7/2019 SOEN 343, © P.Chalin,

11 Refactoring A refactoring is a change made to the internal structure of S/W to make it easier to understand and less expensive to modify, without changing its observable behavior. 4/7/2019 SOEN 343, © P.Chalin,

12 Can you pick out a good design?
What is a good design? Satisfies user needs. Is a simple as possible. Kent Beck: Runs all tests Reveals intention. No duplication. Fewest number of classes or methods … can you smell bad design choices? 4/7/2019 SOEN 343, © P.Chalin,

13 “Bad Smells” Duplication. Long method. … we will be learning more.
4/7/2019 SOEN 343, © P.Chalin,

14 Further Reading Martin Fowler’s, “Is Design Dead”?
martinfowler.com/articles/designDead.html 4/7/2019 SOEN 343, © P.Chalin,

15 UML Class Diagram – Class
Parts named in class 4/7/2019 SOEN 343, © P.Chalin,

16 UML Class Diagram Generalization (inheritance) Dependency
4/7/2019 SOEN 343, © P.Chalin,

17 [Homework] Exercise Set 2
Complete the exercise set 2. 4/7/2019 SOEN 343, © P.Chalin,


Download ppt "SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin."

Similar presentations


Ads by Google