Week 1 Flashcards

1
Q

What should good software be?

A

1.Correct (Safe from bugs)
2. Comprehensible (easy to understand)
3.Changeable (ready to change)

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

Static type checking is

A

can be carried out by the complier, happens before the code in run
(the complier verifies if x & y are compatible but can be wrong)

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

When is static type checking done

A

done at compilation

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

When does dynamic checking

A

during runtime

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

What does using top level statements mean?

A

you don’t use a main function example code:
Console.WriteLine(“Hello World”);

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

What types of members does a class contain?

A

Data members (fields) & function members (methods, constructors)

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

What is a class?

A

A type that contains two kinds of members

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

How would you write this in C#?
//C
void func3(void)
{
sample code
}

A

//C#
void func3()
{
sample code
}

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

Are arrays of fixed size?
What can use use to prevent that

A

yes, lists

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

When using top-level statements, where should we put or own type and namespace declarations?

A

After the statements usually put in the main method.

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

What happens when we use top-level statements?

A

The complier will put the statements into an auto generated main method and an auto-generated class.

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