• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/32

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

32 Cards in this Set

  • Front
  • Back
What is the difference between an object and a class?
A class is a blueprint of an object. It defines the variables and methods that will be a part of every object that is instantiated from it. But a class reserves no memory space for variables. Each object has its own data space and therefore its own state.
What is the scope of a Variable?
The scope of a variable is the area within a program in which the variable can be referenced. An instance variable, declared at the class level, can be referenced in any method of the class. Local variables, including the formal parameters, declared within a particular method, can be referenced only in the method.
What are the UML diagrams designed to do?
A UML diagram helps us visualize the entities (classes and objects) in a program as well as the relationships among them. UML diagrams are tools that help us capture the design of a program prior to writing it.
Objects should be self-governing. Explain.
A self-governing object is one that controls the values of its own data. Encapsulated objects, which don't allow an external client to reach in and change their data, are self-governing.
What is a Modifier?
A modifier is a C# reserved word that can be used in the definition of a variable or method and that specifically defines certain characteristics of its use. Private variables cannot be directly accessed outside of the object in which it is defined.
Describe the public method.
A public method is called a service method for an object because it defines a service that the object provides.
Describe the private method.
A private method is called a support method because it cannot be invoked from outside the object and is used to support the activities of other methods in the class.
Describe the public variable.
A public variable is a variable that can be directly accessed and modified by a client. This explicitly violates the principle of encapsulation and therefore should be avoided.
Describe the private variable.
A private variable is a variable that can be accessed and modified only from within the class. Variables almost always are declared with private visibility.
What does the return statement do?
An explicit return statement is used to specify the value that is returned from a method. The type of the return value must match the return type specified in the method definition.
Explain the difference between an actual parameter and a formal parameter.
An actual parameter is a value sent to a method when it is invoked. A formal parameter is the corresponding variable in the header of the method declaration; it takes on the value of the actual parameter so that it can be used inside the method.
What are constructors used for? How are they defined?
Constructors are special methods in an object that are used to initialize the object when it is instantiated. A constructor has the same name as its class, and it does not return a value.
What is the relationship between an event and a handler?
Events usually represent user actions. An event handler is a method declared in the class definition of the form that performs the appropriate actions for that user action.
Can we add any kind of handler to any component? Explain.
Different controls support a different set of events. To see what events a control supports, open the event portion of the Properties window for that control.
What is meant by the flow of control through a program?
The flow of control through a program determines the program that will be executed on a given run of the program.
What type of conditions are conditionals and loops based on?
Each conditional and loop is based on a boolean condition that evaluates to either true or false.
What are the equality operators?
The equality operators are equal (==) and not equal (!=).
What are the relational operators?
The relational operators are less than (<), less than or equal to (<=), greater than (>), and greater than or equal to (>=).
What is a nested "if" statement?
A nested "if" occurs when the statement inside an "if" or "else" clause is an "if" statement. A nested "if" lets the programmer make a series of decisions.
What is a nested loop?
A nested loop is a loop within a loop.
How do block statements help us in the construction of conditionals and loops?
A block statement groups several statements together. We use them to define the body of an "if" statement or loop when we want to do multiple things based on the boolean condition.
What happens if a case in a "switch" does not end with a "break" statement?
If a case does not with a "break" statement, processing continues into the statements of the next case. We usually want to use "break" statements in order to jump to the end of a "switch"
What is a truth table?
A truth table is a table that shows all possible results of a boolean expression, given all possible combinations of variables and conditions.
How do we compare strings for equality?
We compare strings for equality using the "Equals" method of the "string" class, which returns a boolean result. The "CompareTo" method of the "string" class can also be used to compare strings. It returns a positive, 0, or negative integer result depending on the relationship between the two strings.
Why must we be careful when comparing floating point values for equality?
Because they are stored internally as binary numbers, comparing floating point values for exact equality will be true only if they are the same bit-by-bit. It's better to use a reasonable tolerance value and consider the difference between the two values.
What is an assignment operator?
An assignment operator combines an operation with assignment. For example, the += operator performs an addition, then stores the value back into the variable on the right-hand side.
What is an infinite loop? Specifically, what causes it?
An infinite loop is a repetition statement that never terminates. Specifically, the body of a loop never causes the condition to become false.
Compare and contrast a "while" loop and a "do" loop.
A "while" loop evaluates the condition first. If it is true, it executes the loop body. The "do" loop executes the body first and then evaluates the condition. Therefore, the body of a "while" loop is executed zero or more times, and the body of a "do" loop is executed one or more times.
When would we use a "for" loop instead of a "while" loop?
A "for" loop is usually used when we know, or can calculate, how many times we want to iterate the loop body. A "while" loop handles a more generic situation.
What is a dialog box?
A dialog box is a small window that appears for the purpose of conveying information, confirming an action, or accepting input. Generally, dialog boxes are used in specific situations for brief user interactions.
Compare and contrast check boxes and radio buttons.
Both check boxes and radio buttons show a toggled state: either on or off. However, radio buttons work as a group in which only one can be toggled on at any point in time.
Compare and contrast check boxes and radio buttons.
Both check boxes and radio buttons show a toggled state: either on or off. Check boxes, on the other hand, represent independent options. They can be used alone or in a set in which any combination of toggled states is valid.