ISYS 3393 concept check 5-

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

The logical operators in C# are ____.

&& and ||

if (value1 > value2) largestOne = value1; else if (value1 < value2) largestOne = value2; else largestOne = -(value1); Using the nested if program statements, assuming value1 is 100 and value2 is 100, what is stored in largestOne above?

-(value1)

int counter = 0; while (counter < 100) { Console.WriteLine(counter); counter++; } The first value printed with the program segment above is ____.

0

for (int i = 0; i < 5; i++) Console.Write(i + "\t"); Given the code snippet above, how many times will the loop body be executed?

5

The equality operator in C# is ____.

==

It is important to name the button object, because once named ____.

A program statements can be written to reference it.

____ objects usually appear as small boxes that allow users to make a yes/no selection.

CheckBox

What is the name of the default event handler method for RadioButton and CheckBox objects?

CheckedChanged()

The ____ method of the Control class sets the input focus.

Focus()

The loop control structure used to move through a collection (group of data items) that does not require you to increment a loop control variable or test the expression to determine when all data has been processed is the ____ statement.

Foreach

Which control is used for placing objects, like RadioButtons, together? This control not only offers the benefit of visual appearance, but also helps during design because you can set properties that impact all the associated objects.

GroupBox

The event-driven model used to create Windows applications ____.

Handles the repetiton for you

A company issues $5,000.00 bonuses at the end of the year to all employees who earn less than $100,000. Salary and bonus are both defined as double data types. Which of the following selection statements would assign the correct amount to bonus?

If(salary < 100000) bonus = 5000;

Event handlers are ____.

Methods

With the while loop, the body of the loop is ____.

Performed as long as the conditional expression evaluates to true

A method that calls itself repeatedly until it arrives at the solution is a(n) ____method.

Recursive

____________ loops are often used for inputting data when you do not know the exact number of values to be entered.

Sentinel-controlled loop

To retrieve data from a ListBox control as string data, use the ____ property.

Text

Which of the following statements regarding curly braces is NOT correct as they relate to their use with an if statement?

They are used to block three or more statements.

An interpretation of the while statement is "while the condition is true, perform statement(s)".

True

The process that includes identifying an event, such as a button click as being of interest, and associating a method to be executed when the event occurs describes ____.

Wiring an event

To "prime the read" with a loop, you place an input statement ____.

before the loop body

if (examScore is less than 50) display message "Do better on next exam" In the statement above, the entry inside the parentheses is called the ____.

conditional expression

An instance of the delegate class is called a(n) ____.

delegate

A common problem associated with counter-controlled loops is not executing the loop for the last value. This type of problem is labeled a(n) ____ error.

off-by-one

if (examScore > 89) grade = 'A'; The expression above is considered a(n) ____.

one-way if statement

if (aValue < largest ) result = aValue; else result = largest; What happens when aValue is equal to largest in the program segment above?

result is assigned largest

When a single variable may need to be tested for five different values, the most readable solution would be a(n) ____.

switch statement

if (examScore is less than 50) display message "Do better on next exam" The result of the expression above is ____.

true or false


Set pelajaran terkait

Compensation; Compensation for Special Groups ( Chapter 14)

View Set

CH. 7 - Mutations and CH 8.1 Questions

View Set

Nursing test 2 Clinical science 3100

View Set

Algebra I - Unit 1: Foundations of Algebra Quiz 1: The Language of Algebra

View Set

Independent, Dependent and Control Variables Scientific Method

View Set

HESI Case Study-Spinal Cord Injury

View Set

Science Year 9 Semester 2-Plate Tectonic Theory Test Study

View Set

Chapter 48 Assessment of the Cardiovascular System

View Set