Chapter 2 Flashcards
Software Engineering
An emerging field related to a branch of computer science that provides techniques to facilitate the development of computer programs.
Problem Solving
Refers to the entire process of taking the statement of a problem and developing a computer program that solves that problem
Solution
Consists of two components: algorithms and ways to store data.
Algorithm
A step-by-step specification of a method to solve a problem within a finite amount of time.
Life cycle of software
This process begins with an initial idea, includes the writing and debugging of programs, and continues for years to involve corrections and enhancements to the original software.
What are the phases in the life cycle of typical software?
- Specification
- Design
- Risk Analysis
- Verification
- Coding
- Testing
- Refining the solution
- Production
- Maintenance
What are the phases in the life cycle of typical software?
1. Specification
Given an initial statement of the software’s purpose, you must specify clearly all aspects of the problem.
Prototype program
Simulates the behavior of portions of the desired software product. You can view these specifications as the terms of a contract between your method and the code that calls it.
What are the phases in the life cycle of typical software?
2. Design
After Specification, you must design a solution to the problem. The best way to do this is to simplify the problem-solving process is to divide it into small, manageable parts. the resulting program will contain modules.
Modules
Self-contained units of code.
Loosely coupled
Classes should be designed so that the objects are independent. When loosely coupled, changes in one object will have minimal effects on other objects in the program.
Highly coupled
If every object in a program is connected to every other object. Means that the flow of information between objects is potentially high.
Cohesion
The degree to which the data and methods of an object are related. Highly cohesive methods each perform one well-defined task.
Data flow
Objects interact by sending messages to each other through method calls.
Contract
If you alone write the entire program, this contract helps you semantically decompose the problem into smaller tasks. If the program is a team project, the contract helps delineate responsibilities.
Precondition
A statement of the conditions that must exist at the beginning of a method.
Postcondition
A statement of the condition at the end of a method.
Java Application Programming Interface (API)
A protocol intended to be used as an interface bysoftware components to communicate with each other