Untitled spreadsheet - Sheet1 Flashcards

1
Q

Fatal errors include simple errors in code that prevent compilation or errors that occur during run time.

A

T

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

Semantic errors are errors that cause applications to fail completely, such as simple error in code that prevent compilation.

A

F

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

CS allows you to build applications in what two configurations?

A

Debug & Release

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

Debug builds maintain symbolic information about your application.

A

T

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

How can you switch between the Debug and Release configurations in VS?

A

Using the Solution Configurations drop-down menu in the Standard toolbar.

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

In the release configuration application code is optimized. As a result Release builds will run much faster than Debug builds?

A

T

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

The process of identifying and fixing areas of code that don’t work as expected is known as what?

A

Debugging

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

What is the main advantage of using Release builds?

A

Release builds run faster

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

Debug.WriteLine() and Trace.WriteLine() only allow output of a single string?

A

T

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

There is one way to outpute debugging information?

A

F

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

An alternative to writing information to the output window is to use:

A

Debug.Write() & Trace.Write()

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

Tracepoints are a function of C#

A

F

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

Tracepoints serve the same function as using Debug.WriteLine(). They allow you to output debugging information without altering your code.

A

T

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

What does a tracepoint do?

A

Enabel youto output debugging information without modifying the code.

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

What does a tracepoint do?

A

Writes information to the output window.

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

Tracepoints have no equivalent to the trace commands. There is no way to output information in a Release build using tracepoints.

A

T

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

What is the disadvantage/advantage of tracepoints.

A

The tracepoint is stored in VS.

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

The simplest way to enter break mode is to click the Pause button in the IDE while an application is running

A

T

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

Trace commands are often the only option should you want output during execution of an application built in release mode.

A

T

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

What is a breakpoint?

A

A marker in the source code that triggers automatic entry into break mode.

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

When should you use a tracepoint?

A

When debugging an application to quickly output important information that may help resolve semantic errors.

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

While using debugging in Break Mode you can pause, stop, and restart the application?

A

T

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

A breakpoint appears as a blue circle next to the line of code.

A

F

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

Selecting Hit Count opens a dialog box where you can specify how many times a breakpoint needs to be hit before it is triggered. The drop down list enables what options?

A

Break always; hit count is =, %, >=

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

What are the two ways to get into break mode?

A

Enter break mode when an unhandled exception is thrown. Break when an assertion is generated.

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

What are assertions?

A

instructions that can interrupt application execution with a suer-defined message.

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

What is the easiest way to check the value of a variable?

A

Hover the mouse over its name in the source code while in break mode.

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

You can distribute release builds of your application containing Debug.Assert() functions to keep tabs on things.

A

F

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

It is not possible to pin tooltip windows to the code view.

A

F

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

Step into executes and moves to the next statement to execute.

A

T

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

What are the three ways to control program flow in break mode?

A

Step Into, Over, Out

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

What does Step Out do?

A

Runs to the end of the code block and resumes break mode at the statement that follows.

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

The Call Stack Window enables you to execute commands while an application is running.

A

F

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

The Command and Immediate windows enable you to execute commands while an application is running

A

T

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

What is the purpose of the Call Stack window?

A

Showing the current function along with the function that called it, and the one that called it, et cetera.

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

Which window shows you the way in which the program reached the current location?

A

Call Stack Window

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

An exception is an error generated either in your code or in a function called by your code that occurs before runtime

A

F

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

The C# language includes syntax for SHE. It stands for Stack Exception Handling.

A

F

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

What are the three key words mark code as being able to hand exceptions, along with instructions specifying what to do when an exception occurs?

A

Try, Catch, Finally

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

What does SEH stand for?

A

Structured Exception Handling

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

What is error handling?

A

All techniques of anticipating broblems and writing code that is robust enough to deal with the errors gracefully, without interrupting execution.

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

The “catch” in a try…catch…finally structure contains code that might throw exceptions.

A

T

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

You use the C# toss keyword to generate an exception.

A

F - Throw

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

You don’t always have to supply “catch” blocks for more specific exceptions before more general catching.

A

F

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

You must always supply catch blocks for more specific exceptions before more general catching, or the application will fail to compile.

A

T

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

Exceptions are errors that occur at runtime and that you can trap and process programmatically to prevent your application from terminating.

A

T

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

You can add breakpoints anywhere in your code and you can configure breakpoints to break execution only under specific conditions.

A

T

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

A class encapsulates part of the application, which can be a process, a chunk of data, or a more abstract entity.

A

F

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

Object-oriented programming is a relatively new approach to creating computer applications that seeks to address many of the problems with traditional programming techniques.

A

T

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

OOP techniques are firmly rooted in the structure and meaning of data, and the interaction between that data and other data.

A

T

51
Q

The type of programming often resulting in monolilthic applications, meaning all functionality is contained in a few modules of code is known as (2 Possible Names):

A

functional programming / procedural programming

52
Q

What is also known as procedural programming?

A

Functional programming

53
Q

What is an object?

A

building block of an OOP application.

54
Q

What is the difference between functional and object oriented programming?

A

Functional: all functionality is contained in a few modules of code (often just 1). OOP: More modules of code with each offering specific functionality.

55
Q

What is a language designed and used for modeling applications

A

Unified Modeling Language

56
Q

Class definitions may not be used to instantiate objects

A

F

57
Q

Object and instance of a class mean refer to the same thing?

A

T

58
Q

What does instantiate mean when referring to objects in OOP?

A

Creating a real, named instance of a class.

59
Q

What does the properties and fields provide?

A

Access to the data contained in an object.

60
Q

What is the term used to refer to functions exposed by objects

A

Method

61
Q

As well as this read/write access for properties, you can also specify a different sort of access permission for both fields and properties, known as accessibility.

A

T

62
Q

Each field and property in OOP specifies accessibility, member name, and member type.

A

T

63
Q

In general, it is better to provide properties rather than fields for state access because you have more control over various behaviors.

A

T

64
Q

Methods are called in a way that is unique when compared to the calling of other functions

A

F

65
Q

Public members are said to be exposed by the class.

A

T

66
Q

What is a method?

A

Functions exposed by objets.

67
Q

What is accessability?

A

The ability to specify the type of access permission for both fields and properties.

68
Q

What is the main purpose of methods?

A

Provide access to the object’s functionality.

69
Q

Everything in C# and the .NET Framework is an object.

A

T

70
Q

How many parameters are in the default constructor?

A

None.

71
Q

Nondefault constructors are constructors that include starting parameters.

A

T?

72
Q

The life cycle of an object includes two important stages, these are known as:

A

Construction and Destruction

73
Q

When an object is destroyed. There are often some clean-up tasks to perform such as freeing memory. This is the job of a deconstructor function.

A

T

74
Q

When an object is first instantiated it needs to be initialized. This initialization is known as construction and is carried out by a constructor function, often referred to simply as a constructor for convenience.

A

T

75
Q

Classes with no public constructors are noncreatable.

A

T

76
Q

Destructors are used by the .NET Framework to clean up after objects.

A

T

77
Q

In general, you don’t have to provide code for a constructor method; instead, the default operation does the work for you.

A

T

78
Q

Noncreatable classes have no public constructor.

A

T

79
Q

Static fields are also known as shared fields.

A

T

80
Q

Static members are shared between instances of a class.

A

T

81
Q

A class can have a single static constructor, which must have no access modifiers and cannot have any parameters.

A

T

82
Q

A static constructor can never be called directly.

A

T

83
Q

An what is a collection of public instance methods and properties that are grouped together to encapsulate specific functionality.

A

Interface

84
Q

An interface is a collection of public instance methods and properties.

A

T

85
Q

Interfaces can exist on their own.

A

F

86
Q

Interfaces cannot contain any code that implements its members.

A

T

87
Q

Rather than make constructors of a class private one strategy is to use a static class.

A

T

88
Q

What does a static class do?

A

Allows you to use classes that contain only static members and cannot be used to instantiate objects.

89
Q

What is an interface?

A

A collection of public instance methods and properties that are grouped together to encapsulate specific functionality.

90
Q

Classes can support multiple interfaces, and multiple classes can can support the interface.

A

T

91
Q

Interfaces implements on objects in UML are shown using lollipop syntax.

A

T

92
Q

What is the purpose of Disposable Objects?

A

It is used to free up any critical resources that might otherwise linger until the destructor method is called on garbage collection.

93
Q

A protected type of accessibility only derived classes have access to a member.

A

T

94
Q

Although inheritance is an important feature of OOP, it does not enable you to extend or create more specific classes from a base class

A

F

95
Q

In OOP terminology, the class being inherited from is the parent class

A

T

96
Q

What does inheritance mean in OOP?

A

a class will have all the members of the class from which it inherits.

97
Q

What does it mean for a base class to be virtual?

A

The member can be overridden by the class that inherits it.

98
Q

What is inheritance

A

It will have all the members of the class from which it inherits.

99
Q

What cannot be used as a base class?

A

An abstract case.

100
Q

What is a useful technique for performing tasks with a minimum of code on different objects descending from a single class.

A

Polymorphism

101
Q

All classes in C# derive from the base class object at the root of their inheritance hierarchies

A

T

102
Q

What is polymorphism?

A

A way to perform tasks with minimum code on different objects descending from a single class.

103
Q

What is simple to achieve by using a member field to hold an object instance

A

Containment

104
Q

Collections are simple to achieve by using a member field to hold an object instance.

A

F

105
Q

Interface polymorphism is a way to have a variable of an interface type.

A

T

106
Q

What is the difference between containment and inheritance?

A

Containment is similar to inheritance but allows the containing class to control access to members of the caintained class. Collections is similar to arrays of objects, but collactions have additional functionality.

107
Q

What is the main purpose of interface polymorphism?

A

To have a variable of an interface

108
Q

What is a collection in OOP?

A

A collection is basically a module with bells and whistles, and is implements as classes in much the same way as other objects.

109
Q

What is basically an array with bells and whistles?

A

Collection

110
Q

What are important occurrences that you can act on in other parts of code, similar to exceptions.

A

Events

111
Q

Events are occurrences that can act on in other prats of code.

A

T

112
Q

Every class you create will be a value type.

A

T

113
Q

One key difference between value types and reference types is that value types always contain a value, whereas reference types can be null, reflecting the fact that they contain no value.

A

T

114
Q

Strings, objects, and arrays are examples of reference types.

A

T

115
Q

Value types store themselves and their content in multiple places in memory

A

F

116
Q

What does it mean for an operator to be overloaded?

A

An operator for which you have written the code to perform the operation involved, the code is added to the class definitoinn of one of the classes that it operates on.

117
Q

What is one key difference between value types and reference types.

A

Reference types can be null.

118
Q

What is one key difference between value types and reference types.

A

Value types always contain a value, whereas reference types can be null.

119
Q

All objects instantiated from a derived class can be treated as if they were instances of a parent class

A

T

120
Q

Inheritance is the mechanism through which one class definition can derive from another.

A

T

121
Q

Static members are available only on object instances of a class.

A

F

122
Q

What are a collection of public properties and methods that can be implemented on a class.

A

Static members

123
Q

What is an interface?

A

A collection of public properties and methods that can be implemented on a class.