exam 1 (includes testing) Flashcards

(21 cards)

1
Q

open/closed principle

A

classes + libraries should be open for extensions but closed for modifications

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

single-responsibility principle

A

a class should only have a single responsibility; only one factor should change how the class functions

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

Liskov principle

A

subclasses should be uszable anywhere the superclass is expected without breaking the program

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

interface segregation principle

A

many client-specific interfaces are better than one general purpose interface;

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

dependency inversion principle

A

high-level modules should not depend on low-level modules; both should depend on abstractions; abstractions should not depend on concrete implementations, but concrete implementations should depend on abstraction

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

SOLID

A

single-responsibility; open-closed; liskov; interface segregation; dependency inversion

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

Java bytecode

A

.class files are filled with bytecode– binary– so it can be run on the JVM;

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

package

A

organize code by grouping related classes; similar to a folder

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

inheritance

A

a child class inherits methods and other features from a parent class; class Subclass extends Class

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

project management

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

HTTP

A

HyperText Transfer Protocol; request-response protocol where text has interconnected content; transfer information between networked devices

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

HTTP has no state

A

each indication of something doesn’t depend on a past result;
ex: logging in only relies on the current request for a password. you log in if it’s correct, even if the previous one was wrong

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

interface

A

build a class without concrete definition; “empty” methods

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

implementation w inheritance

A

class className implements inter1, inter2 {
class className extends onlyOneSuperclass {

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

@Override

A

use before an inherited method to change its behavior / modify for this class

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

annotations

A

usually for the purpose of the reader/programmer; JUnit relies on annotations (@Test) but little else does

17
Q

@Test

A

tells JUnit where unit tests are located to run them

18
Q

JUnit

A

automated testing framework for Java

19
Q

JVM

A

engine that runs Java programs; takes .class files and bytecode and executes them

20
Q

javac

A

java compiler; turns .java into .class to be run by the java virtual machine

21
Q

a class may implement many/one:

A

many interfaces, but only extend one superclass