Lecture 12 - Quality, Strings, Generics Flashcards

1
Q

External Quality

A

External Quality (User Perspective) - No crashes, good performance.

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

Internal Quality

A

Internal Quality (Developer Perspective) - Code is understandable, code is testable, code is easy to update.

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

Don’t duplicate code

A

It leads to late propagation. It is a bug caused because you forgot to make changes in all locations that you copied the code to/from.

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

Cyclomatic Complexity and Testing

A

It is the number of linearly independent paths in the program. 0-5 Perfect. 6-10 Difficult to test and understand. >30 Extremely complex.

If your method has a CC of 6, you need at least 6 methods to cover all the paths.

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

Java Generics

A

Java will automatically wrap and unwrap primitive types. This is autoboxing.

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

Generic Arugments

A

Generic Arguments are compile time only. Run-time does not know about the type specialization. We can place type constraints on generic type arguments.

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