Week 1 Flashcards
What should good software be?
1.Correct (Safe from bugs)
2. Comprehensible (easy to understand)
3.Changeable (ready to change)
Static type checking is
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)
When is static type checking done
done at compilation
When does dynamic checking
during runtime
What does using top level statements mean?
you don’t use a main function example code:
Console.WriteLine(“Hello World”);
What types of members does a class contain?
Data members (fields) & function members (methods, constructors)
What is a class?
A type that contains two kinds of members
How would you write this in C#?
//C
void func3(void)
{
sample code
}
//C#
void func3()
{
sample code
}
Are arrays of fixed size?
What can use use to prevent that
yes, lists
When using top-level statements, where should we put or own type and namespace declarations?
After the statements usually put in the main method.
What happens when we use top-level statements?
The complier will put the statements into an auto generated main method and an auto-generated class.