Test 1 Flashcards

1
Q

Software Development Lifecycle (steps)

A

REQUIREMENTS Determine the required input and output.
DESIGN a solution to the problem / develop an algorithm
CODE / DEVELOPMENT – translate the algorithm into code. Develop an effective user interface that obtains required inputs from the user and displays results.
TESTING and DEBUG the program. How can you prove to yourself (and others) that the program works for all expected and unexpected inputs?
PRODUCTION / DEPLOYMENT
MAINTENANCE * longest stage *
DOCUMENTATION throughout.

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

Design consideration

A

Algorithm and classes

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

Classes - what’s private / public.

Design consideration

A
Private: instance variables, helper methods
Public: constants, class methods
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Coupling

Design consideration

A

Minimize coupling between classes / modules.

Coupling is the degree to which a class interacts with or depends on another class.

undesirable state in which two methods or processes rigidly depend on each other. Coupling and dependencies between methods should be minimized.

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

Cohesion

Design consideration

A

How well a class encapsulates a single notion.

Maximize within classes / modules.

desirable quality in which the responsibilities of a method or process are closely related to each other.

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

Architecture (class hierarchy)

Design consideration

A

class relationships

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

Programming by Contract:

What this means. Contract between what parties?

A

Client and supplier.

Agreement that supplier will deliver on post-conditions, and client will follow requirements of pre-conditions. Rights / responsibilities.

Public interface = contract

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

Programming by Contract:

What goes into the public interface documentation?

A

Public interface:

  • What are the benefits?
  • Rights / responsibilities.

Specification:

  • restriction on arguments
  • what return will be
  • any state changes that might happen and when
  • when any exceptions might be thrown.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Programming by Contract:

Advantages for client/supplier of distinction between public/private members

A

controlling what members can be accessed and updated with / without use of an object / method. private will keep certain values protected from the client so they don’t accidentally get changed

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

Unit testing:

What this means

A

Test individual properties or operations of objects.

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

Unit Testing

When should testing design happen

A

Frequently. Do many small unit tests versus big complicated tests.

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

Precondition

A

something that must be true before a method can be called

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

Postcondition

A

something guaranteed to be true after method finishes.

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

Class invariant

A

something that must always hold true.

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

UML Object Diagram

A

represents state of object in memory at given point of execution

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

Abstraction

A

allows us to talk about things at a higher level without knowing how they work. EX square root button on calculator.

17
Q

Encapsulation

A

implementation of abstraction.
data and behavior bundled
hides implementation from client

18
Q

Inheritance (Is-A)

What is inherited?

A
  • pubic members (variables and methods) are inherited
  • instance variables technically are not inherited but the first call of a subclasses constructor is a call to the super classes constructor where the super’s instance variables are initialized and are therefore essentially inherited because they will always be part of a subclasses state.
19
Q

protected

A

client can’t access but subclass can

20
Q

super

A

keyword that makes a call to the super