Presentation is loading. Please wait.

Presentation is loading. Please wait.

WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010.

Similar presentations


Presentation on theme: "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010."— Presentation transcript:

1 WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint They may not show up well on other PowerPoint versions. You can download PowerPoint 2010 viewer from here.here These slides contain a lot of animations. For optimal results, watch in slideshow mode.

2 Which is the better Minesweeper design? design {a|b} e.g. design b design {a|b} e.g. design b LogicMinefield Storage LogicMinefield Storage :Logicm:Minefield:Storage mark update(m) :Storage mark update(m) :Logic mark (a)(b) get info m:Minefield OR tinyurl.com/answerpost

3

4

5 To Tighten or Loosen: What Makes a Good Component. CS2103/T, Lecture 7, Part 1, [Oct 3, 2014]

6 To Tighten or Loosen: What Makes a Good Component. CouplingCohesion

7 To Tighten or Loosen: What Makes a Good Component. CouplingCohesion

8 Coupling

9 Component A Component B If I change B, will it require a change in A ? a) NO WAY b) It might Coupling Dependency ==

10 Component A Component B Coupling If I change B, will it require a change in A ?

11 Component A Component B Coupling If I change B, will it require a change in A ?

12 Component A Component B Coupling

13 Component A Component B If I change B, will it require a change in A? Yes, It might Reduce coupling

14

15 Good Component design cohesion Reduce coupling Parser Logic

16

17 cohesion

18 Does one thing and does it all Component A Component B Component C cohesion

19 Component A Window 1 Window 2 Window 3 Does one thing and does it all cohesion

20 Component A Component B Component C Does one thing and does it all cohesion

21 Component A Component B Component C Does one thing and does it all cohesion

22 Component A Component B Component C Does one thing and does it all cohesion

23 Component A Component B Component C Increase cohesion Does one thing and does it all cohesion

24 Component A Component B Component C Increase cohesion Does one thing and does it all cohesion

25 Good Component design Reduce coupling Increase cohesion Parser Logic

26 Reduce coupling Increase cohesion

27 Use these two concepts to analyze/justify design decisions.

28 LogicMinefieldStorageLogicMinefieldStorage (a)(b)

29 LogicMinefieldStorageLogicMinefieldStorage (a)(b) Which is the better design and why? why {a|b} {explanation} e.g. why b because … why {a|b} {explanation} e.g. why b because … OR tinyurl.com/answerpost Discuss with others before submitting

30


Download ppt "WARNING These slides are not optimized for printing or exam preparation. These are for lecture delivery only. These slides are made for PowerPoint 2010."

Similar presentations


Ads by Google