Conceptual Flashcards

1
Q

Test Driven Development

A
  • Add test
  • Run test and fail
  • Implement new functionality
  • Test should now pass
  • Refactor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Single Responsibility Principle

A

Each thing should only do one thing

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

Interface Segregation Principle

A

states that no code should be forced to depend on methods it does not use
ie split your methods down so you can customize what’s relevant

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

Singleton pattern

A

software design pattern that restricts the instantiation of a class to a singular instance

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

Wrapper class what is it

A

A wrapper object stores a single value of the corresponding type

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

Wrapper class why

A

useful to store primitives in various data
structures like Sets
and
useful static conversion methods

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

How many parent classes can a child class have?

A

1

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

child classes methods

A

unique or can modify parent methods

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

abstract class and instance variables

A

maybe

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

abstract class and constants

A

yeah

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

Abstract class and abstract method

A

yes but no body

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

-there is common data (instance variables), and/or
-some functionality can be defined, and
-some functionality depends on child class

A

abstract class

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

-you are just specifying that certain behavior (i.e., methods) must exist
-no instance variables are allowed
-constants are allowed – why?

A

Use an interface

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

enum type

A

type whose fields consist of a fixed set of
constants

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

Array benefits

A

*Fixed size
*More efficient if large number of primitives (e.g., int)

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

ArrayList Benefits

A

*Grows automatically
*Includes some handy functionality

17
Q

UML: -

A

private

18
Q

UML: +

A

public

19
Q

UML: #

A

protected

20
Q

generalization relationship

A

parent and child
solid line with open arrow towards parent

21
Q

uml: abstraction

A

”<”abstract”>” at top
dotted arrow for children

22
Q

UML: association

A

sold line with > arrow not triangle
when a class references another class

23
Q

UML: aggregation

A

diamond arrow thingy