Review Questions
-
How does abstraction help the programmer to cope with complexity?
-
Is the idea behind encapsulation confined to software design? Give an example from everyday life.
-
What are the advantages of using encapsulation in software construction?
-
Which two C# keywords are important for implementing encapsulation?
-
What are the differences between a class and its objects?
-
What is the significance of the class interface?
-
How do you specify the beginning of a comment?
-
Why use comments if the compiler ignores them?
-
What are keywords and identifiers?
-
How is a block specified in C#? What are blocks used for?
-
Can you write a program without a Main method? Why or why not?
-
What are the essential parts of a variable?
-
What is a simple C# instruction called? How is it terminated?
-
Which class and which method can you call in the .NET Framework class library to print text on the console? Write a statement that prints "My dog is brown."
-
How is a method called? What happens when a method is called?
-
What is an assignment? Which symbol is used to perform an assignment?
-
What is the advantage of declaring variables?
-
How can you make the program decide between two paths of execution?
-
What is whitespace? Does the compiler care much about whitespace?
-
Do all programmers have to follow the same style to write valid C# programs?