Exam 7: Using Methods

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If you do not provide an accessibility modifier for a method, it is private by default.

(True/False)
4.9/5
(41)

Explain how to write a Main() method that accepts parameters. Why might this format be used?

(Essay)
4.8/5
(39)

A method ____________________ defines the rules for using the method and can include accessibility, static, and return type modifiers.

(Short Answer)
4.8/5
(38)

A program element's ____ is the segment of code in which it can be used.

(Multiple Choice)
4.8/5
(38)

With ____, if a programmer changes the way in which a method internally works, programs that use that method will not be affected and will not need to be modified.

(Multiple Choice)
4.8/5
(39)

The ____ accessibility modifier allows access to a method from other classes.

(Multiple Choice)
4.8/5
(35)

When an array passed to a method is passed by ____, the method receives the actual memory address of the array and has access to the actual values in the array elements.

(Multiple Choice)
4.7/5
(40)

For a method that accepts a parameter, what are the components of the parameter definition that must be included in the method declaration? Show an example of a method declaration with a parameter.

(Essay)
4.7/5
(37)

A(n) ____________________ is an encapsulated series of statements that carry out a task.

(Short Answer)
4.8/5
(37)

A method that uses another is called a ____ of the method it uses.

(Multiple Choice)
4.8/5
(35)

When method calls are placed inside other method calls, the calls are ____ method calls.

(Multiple Choice)
4.8/5
(31)

You can tell a lot about a built-in method when you see how it is used. What can you tell about the built-in Pow() method (used to raise a number to a power) from the following statement? double result = Math.Pow(2.0, 3.0);

(Essay)
4.7/5
(42)

When you place a Button named okButton on a Form in the IDE and double-click it, a method is automatically generated with the following header: ____ okButton_Click( object sender, EventArgs e) .

(Multiple Choice)
4.7/5
(32)

A(n) ____ is a device you can use without knowing how it works internally.

(Multiple Choice)
4.8/5
(37)

A method can return, at most, one value to a method that calls it.

(True/False)
4.8/5
(34)

The type of an argument in a method call must exactly match the type of the corresponding parameter specified in the method declaration.

(True/False)
5.0/5
(41)

Every method has a(n) ____________________, indicating what kind of value the method will return to any other method that calls it.

(Short Answer)
4.8/5
(37)

Write a DisplaySalesTax() method that receives the sales amount and tax rate as double s, and calculates and displays the sales tax. The method does not return a value.

(Essay)
4.8/5
(41)

What are the components of a C# method?

(Essay)
4.9/5
(35)

What are the components of a C# method declaration?

(Essay)
4.9/5
(35)
Showing 21 - 40 of 42
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)