Week 3 Flashcards

1
Q

How do you get pi?

A

Math.PI;

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

What namespace does the Math class use?

A

using System;

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

How do call a cosine function?

A

Math.Cos(x);

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

What namespace does BigInteger need?

A

using System.Numerics;

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

Definition of static checking:

A

bug found automatically before program even runs.

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

Definition of Dynamic checking:

A

bug found automatically during runtime

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

No checking

A

The complier won’t find the error you have to. Code probably won’t run correctly.

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

What types of errors can static checking find.

A

Syntax errors, wrong names, wrong number of arguments, wrong argument types, wrong return types

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

What type of errors can dynamic checking catch?

A

illegal argument values, unrepresentable return values, out-of-range indexes, calling a method on a null object reference.

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

What does the “readonly” keyword do?

A

readonly indicates that a field can only be assigned at the time of declaration or in a constructor of that class.

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

What does the const keyword do?

A

declares a constant local or a constant field (only initialized at its declaration, and cannot be changed after)

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