Download presentation
Presentation is loading. Please wait.
1
MIS 324 -- Professor Sandvig MIS 324 Professor Sandvig
2/5/2018 Design Goals MIS 324 Professor Sandvig
2
MIS 324 -- Professor Sandvig
2/5/2018 Overview Design Goals Terminology Encapsulation Abstraction Loose coupling How implemented in C# Classes Variable Scope
3
Design Goals Applications getting more complex
Lines of code: Chrome browser: 5 million Android OS: 12 million Facebook site: 60 million 2016 Ford pickup: 150 million Google: 2 billion Need to minimize complexity
4
Design Goals Minimize complexity Modularity Reusability
Compartmentalize code into classes Hide details inside Class interfaces expose only what is needed Modularity Each class has single purpose Reusability Maintainability Minimize amount of code Minimize dependencies
5
Design Goals Legos analogy: Modular Reusable Simple interface
Each piece has single purpose Reusable Pieces can be used in multiple products Simple interface Maintainable
6
Encapsulation Fundamental principle of OOP Code wrapped inside classes
Hide implementation details Reduce complexity
7
Encapsulation Also called information hiding Exposes simple interface
Hides implementation details Exposes simple interface Reusable
8
Abstraction Interface provided to outside Corollary to encapsulation:
Encapsulation hides Abstraction exposes
9
Abstraction Class Public members are abstraction
Private are encapsulation
10
Loose Coupling Goal: design classes and interfaces to minimize dependencies Each class has a single purpose Clear relationships with other classes
11
Loose Coupling Example: dog class Clear purpose Interface:
Exposes all necessary dog properties Validates inputs (birthdate, weight) Hides messy details (calculating age)
12
MIS 324 -- Professor Sandvig
2/5/2018 Variable Scope Within classes variable scope limited to control structures & children
13
MIS 324 -- Professor Sandvig
2/5/2018 Summary Goals: Minimize complexity Modularity Reusability Maintainability Tools Classes Variable scope
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.