Design - Program Design Flashcards
Program Design
What will analysts do for program design?
Determine what programs will be written
Create instructions for the programmers about what the code should do
And determine how the pieces of code will fit together to form the system.
Why is Program Design Important?
Some people may think that program design is becoming less important.
Project teams increasingly rely on packaged software or libraries of pre-programmed code to build systems.
Program design techniques are still very important, however, for two reasons.
1) It is still common for the project team to have to write some (if not all) code and produce original programs that support the application logic of the system
2) Even the pre-existing code needs to be understood, organized and pieced together.
How do we move from Analysis to Design?
During the analysis phase, processes were modelled
Now we are taking those tasks/processes, and they are becoming the modules that we are designing.
At an analysis level you might have a process that touches a data store.
At design level you have a module that:
(CRUD)
Creates
Retrieves
Updates
Deletes data from your entries
How do we model class diagrams?
Using UMLs
What does UML stand for?
Unified Modelling Language
What are the program design prinicples?
Build modules with high cohesion:
- Should do one thing well
- Unrelated functionality should be factored out to other modules
Build Loosely Coupled Modules:
- Build modules that do one thing well without too much outside help.
- Code changes in one module should have minimal changes in another
- Design dependencies mean installation dependencies
Create High Fan-In (Promoted Reuse):
- Design dependencies mean installation dependencies :
- Promoted re-use whenever practical
- High fan-in indicates that a module is reused in many places
- Minimize code changes that need to be made
Avoid High Fan-Out (Don’t make modules too small):
- It makes code harder to read and follow
- High degree of class interdependency (a module is dependent on a large number of other modules)
What is the reasonable module code review checklist?
✓ Library modules have been created whenever possible.
* ✓ Modules have been reused where appropriate.
* ✓ Each module performs only one function (high cohesion).
* ✓ Modules sparingly share information (loose coupling).
* ✓ Data that is passed is actually used by the accepting module.
* ✓ Modules should depend on abstractions not concretions
What are the 5 design principles intended to make object-oriented designs more understandable, flexible, and maintainable
The Single-responsibility principle: “There should never be more than one reason for a class to change.” n other words, every class should have only one responsibility.
The Open–closed principle: “Software entities … should be open for extension, but closed for modification.“
The Liskov substitution principle: “Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it. “See also design by contract.
The Interface segregation principle: “Clients should not be forced to depend upon interfaces that they do not use.“
The Dependency inversion principle: “Depend upon abstractions, [not] concretes.”
What are the 6 main ISO 9126 on Code quality, and their descriptions?
- Functionality:
The existence of a set of functions and their specified properties. The functions are those that satisfy stated or implied needs. - Reliability:
The capability of software to maintain its level of performance under stated conditions for a stated period of time - Useability:
The effort needed for use, and on the individual assessment of such use, by a stated or implied set of users - Efficiency:
The relationship between the level of performance of the software and the amount of resources used, under stated and conditions - Maintainability:
The effort needed to make specified modifications - Portability:
The ability of software to be transferred from one environment to another
What are the sub-categories of the ISO code quality on Functionality?
Suitability
Accuracy
Interoperability
Security
Functionality compliance
What are the sub-categories of the ISO code quality on Reliability?
Maturity
Fault Tolerance
Recoverability
Reliability Compliance
What are the sub-categories of the ISO code quality on Usability?
Understandability
Learnability
Operability
Attractiveness
Usability Compliance
What are the sub-categories of the ISO code quality on Efficiency?
Time behaviour
Resource Utilization
Efficiency compliance
What are the sub-categories of the ISO code quality on Maintainability?
Analyzability
Changeability
Stability
Testability
Maintainability compliance
What are the sub-categories of the ISO code quality on Portability?
Adaptability
Installability
Co-existence
Replaceability