Chapter 2 Flashcards

1
Q

Software Engineering

A

An emerging field related to a branch of computer science that provides techniques to facilitate the development of computer programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Problem Solving

A

Refers to the entire process of taking the statement of a problem and developing a computer program that solves that problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Solution

A

Consists of two components: algorithms and ways to store data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Algorithm

A

A step-by-step specification of a method to solve a problem within a finite amount of time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Life cycle of software

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the phases in the life cycle of typical software?

A
  1. Specification
  2. Design
  3. Risk Analysis
  4. Verification
  5. Coding
  6. Testing
  7. Refining the solution
  8. Production
  9. Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the phases in the life cycle of typical software?

1. Specification

A

Given an initial statement of the software’s purpose, you must specify clearly all aspects of the problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Prototype program

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the phases in the life cycle of typical software?

2. Design

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Modules

A

Self-contained units of code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Loosely coupled

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Highly coupled

A

If every object in a program is connected to every other object. Means that the flow of information between objects is potentially high.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Cohesion

A

The degree to which the data and methods of an object are related. Highly cohesive methods each perform one well-defined task.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Data flow

A

Objects interact by sending messages to each other through method calls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Contract

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Precondition

A

A statement of the conditions that must exist at the beginning of a method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Postcondition

A

A statement of the condition at the end of a method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Java Application Programming Interface (API)

A

A protocol intended to be used as an interface bysoftware components to communicate with each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the phases in the life cycle of typical software?

3. Risk Analysis

A

Building software entails risks. Some risks are the same for all software projects and some are peculiar to a particular project. Risks can affect a project’s timetable or cost, the success of a business, or the health and lives of people.

20
Q

What are the phases in the life cycle of typical software?

4. Verification

A

Formal, theoretical methods are available for proving that an algorithm is correct.

21
Q

Assertion

A

A statement about a particular condition at a certain point in an algorithm.

22
Q

Invariant

A

A condition that is always true at a particular point in an algorithm. By using these, you can detect errors before you begin coding and thereby reduce your debugging and testing time.

23
Q

Loop Invariant

A

A condition that is true before and after each execution of an algorithm’s loop. These can help you to write correct loops.

24
Q

What are the steps to establish the correctness of an algorithm.

A
  1. The invariant must be true initially
  2. An execution of the loop must preserve the invariant.
  3. The invariant must capture the correctness of the algorithm.
  4. The loop must terminate.
25
Q

Inductive Step

A

Showing that each iteration of the loop preserves the invariant.

26
Q

What are the phases in the life cycle of typical software?

5. Coding

A

Involves translating the design into a particular programming language and removing the syntax errors.

27
Q

What are the phases in the life cycle of typical software?

6. Testing

A

During this phase, you need to remove as many logical errors as you can.

28
Q

What are the phases in the life cycle of typical software?

7. Refining the solution

A

Develop a working program under simplifying assumptions; then add refining sophistication.

29
Q

What are the phases in the life cycle of typical software?

8. Production

A

When the software product is complete, it is distributed to its intended users, installed on their computers, and used.

30
Q

What are the phases in the life cycle of typical software?

9. Maintenance

A

Correcting user-detected errors and adding features

31
Q

Procedural abstraction

A

Separates the purpose of a method from its implementation. Abstraction specifies each method clearly before you implement it in a programming language.

32
Q

Data Abstraction

A

Focuses on what the operations do instead of on how you will implement them.

33
Q

Abstract Data Type (ADT)

A

A collection of data and a set of operations on the data.

34
Q

Data Structure

A

A construct that you can define within a programming language to store a collection of data.

35
Q

Information Hiding

A

This principle tells you not only to hide such details within a module, but also ensures that no other module can tamper with these hidden details.

36
Q

Objects

A

Encapsulate data and operations

37
Q

Encapsulates

A

Encase or enclose. It is a technique that hides inner details.

38
Q

Three Principles of Object-Oriented Programming

A
  1. Encapsulation: Objects combine data and operations.
  2. Inheritance: Classes can inherit properties from other classes.
  3. Polymorphism: Objects can determine appropriate operations at execution time.
39
Q

Inheritance

A

Allows you to reuse classes that you defined earlier with appropriate modification. Makes it possible for the compiler to determine which operation you require in a particular situation.

40
Q

Polymorphism

A

Enables this determination to be made at execution time. The outcome of a particular operation depends upon the objects on which the operation acts.

41
Q

Structure Chart

A

Shows the relationship among methods.

42
Q

Unified Modeling Language (UML)

A

A modeling language used to express object-oriented designs. Provides specifications for both diagrams and text-based descriptions.
Top - Class Name
Middle - Contains the data members that represent the data in the class.
Bottom - Operations

43
Q

Modularity

A
Slows the rate at which the level of difficulty in programming a program grows.
Facilitates Programming
Isolates Errors
Programs are easier to read
Isolates Modifications
Eliminates Redundancies
44
Q

Modifiability

A

Methods make it easier to modify

Named Constants make it easier to modify

45
Q

Ease of Use - A Good User Interface

A

The program should prompt the user for input
The program should echo the input
The program should label the output

46
Q

Fail-Safe Programming

A

This is a program that will perform reasonably no matter how anyone uses it.

47
Q

Rightward Drift

A

The problem of nested blocks bumping against the right-hand margin of the page