lec 5 software complexity

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:42 AM on 5/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

26 Terms

1
New cards
What are the characteristics of good software design?
Class independence; High cohesion; Low coupling; Fault prevention and tolerance; Principle of least astonishment
2
New cards
What is class independence?
Classes operate with minimal reliance on other classes (high cohesion and low coupling)
3
New cards
What is cohesion in software?
The degree to which elements of a class belong together and serve a single purpose
4
New cards
What are the types of cohesion?
Functional cohesion; Sequential cohesion; Coincidental cohesion
5
New cards
What is functional cohesion?
All methods in a class contribute to one well-defined task (ideal case)
6
New cards
What is a functionally cohesive class?
A class that performs only one task and nothing else
7
New cards
What is sequential cohesion?
Output from one part of a class becomes input to another
8
New cards
What is coincidental cohesion?
Unrelated methods grouped together in a class
9
New cards
Why is coincidental cohesion bad?
Reduces clarity and maintainability; often leads to large class code smells
10
New cards
What is coupling?
The degree of interdependence between classes
11
New cards
What are the types/levels of coupling?
Uncoupled; Loosely coupled; Highly coupled
12
New cards
What is loose coupling?
Classes have minimal dependencies (ideal for flexibility)
13
New cards
What is tight/high coupling?
Classes have many dependencies and changes affect other classes
14
New cards
Why is high coupling a problem?
Changes in one class impact others, increasing complexity and maintenance difficulty
15
New cards
What does uncoupled mean?
No dependencies between classes
16
New cards
What does loosely coupled mean?
Some dependencies but manageable and preferred
17
New cards
What does highly coupled mean?
Many dependencies requiring refactoring
18
New cards
What is the Law of Demeter?
A class should only communicate with closely related classes ("only talk to friends")
19
New cards
Why is the Law of Demeter important?
Reduces unnecessary coupling and improves maintainability
20
New cards
What is the Principle of Least Astonishment?
Systems should behave in a way users expect without surprises
21
New cards
Why is the Principle of Least Astonishment important?
Improves usability and reduces confusion
22
New cards
What does KISS stand for?
Keep It Simple, Stupid
23
New cards
What does KISS mean in software design?
Choose the simplest solution that works
24
New cards
What is fault prevention?
Designing systems to avoid faults occurring
25
New cards
What is fault tolerance?
Designing systems to continue operating even when faults occur
26
New cards
What is Automatic Program Repair (APR)?
Techniques that automatically detect and fix software bugs