mode 2 Flashcards

1
Q

What is a Singleton?

A

Singleton is a DESIGN PATTERN

It isn’t a keyword or syntax in java, it’s a way to construct your code to achieve a greater effect. In short, it’s a strategy not a keyword.

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

What is the Factory Design Pattern

A

Another design pattern you should be aware of is the “Factory Design Pattern”. The purpose of the factory design pattern is to produce other objects

a Factory can ALSO keep track of upkeep variables and statistics variables for the target class

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

What is Logging?

A

In Java, logging is an important feature that helps developers to trace out the errors. We use log4j for our purposes

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

What is a usecase for log4j?

A
try {
			//stuff
		}catch(Exception myExcep) {
			loggy.error("I think my catch block just triggered", myExcep);
		}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Automated Testing

A

Testing allowing us to test different aspects of our code base.

There a lot of different kinds of testing in Java;

Smell Testing, Security Testing, Integrated Testing, Unit Testing

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

What is JUnit?

A

JUnit is a unit testing framework for the Java programming language.

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