jgs CSC 309 Software Engineering II Lecture 04: Structural Quality Principles Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 4 § Distance: how far a package is away from the Main Sequence § D = A + I – 1 § Values -1 to 1 § Absolute Distance |D| Distance
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 6 public class Foo { Bar b= new Bar(new Car()); public Foo (Car c) { c.doIt(b); } public void m (Delta d) { d.action(b); } } public class System { public ... main ( ...) { Foo f = new Foo(); //... } } Question
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 7 public class Foo { Bar b= new Bar(new Car()); public Foo (Car c) { c.doIt(b); } public void m (Delta d) { d.action(b); } } public class System { public ... main ( ...) { Foo f = new Foo(); //... } } Question Any candidate for the “painful” zone:
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 11 Stable Dependencies Principle Every dependency between modules should terminate on a module whose Instability is less than or equal to the depending module's Instability. Every dependency between modules should terminate on a module whose Abstractness is greater than or equal to the depending module's Abstractness.
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 24 Office Hours Tuesday and Thursday 3 - 5 pm But an appointment required Sent me an email – [email protected]
jgs CSC 309 Software Engineering II Lab 4: Design Principles SAP + SDP Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 27 Let’s Work Let’s start by Fixing your class Diagrams (If needed) • How many classes should exist? • Are there connections missing? • Are there classes disconnected? • Remember the level of abstraction. • (not everything needs to be shown, • But what is shown is important)
jgs CSC 309 Software Engineering II Javier Gonzalez-Sanchez, Ph.D. [email protected] Winter 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.