C# Chapter 4 part 1
In order to test a class, ____.
a different class is needed, invoke instance methods using the objects you construct., and use the properties to assign and retrieve values.
A property resembles a(n) ____, but is more closely aligned to a(n) ____.
data field, method
Accessors, mutators, and other instance methods are normally defined with what type of access modifier?
public
Constructors differ from other methods in that constructors ____.
use the same identifier as the class
C# is an object-oriented language. All the code for an application must be placed in a(n) ____.
class
Which of the following is NOT a true statement relating to constructors?
The default constructor must be the first one written for the class.
The ToString( ) method is automatically invoked when an object reference is made in the ____.
Write( ) method
The ToString( ) method is automatically invoked when an object reference is made in the ____.
Write( ) method
Local variables ____.
are defined inside Main( ) and other methods
To add full functionality to your classes, ____.
write more than one constructor
____ are special methods used to read the current state or value of an object member's data.
Accessors
Instance methods manipulate data by ____.
directly accessing private data members.
When you define the class, you describe its ____ in terms of data and its behaviors, or methods, in terms of what kinds of things it can do.
attributes, characteristics, and fields
Constructors should be defined with a ____ access modifier.
public
When you define a class, you can use ____ to display all public members of the class (once an object is instantiated).
intellisense
To define a property to change a data member of a class include a ____ clause.
set
C# is an object-oriented language as such all the code that you write has to be placed in a(n) ____________.
class
As with overloaded methods, ____________ must differ for constructors.
signatures
When you define the class, you describe its ____________, or characteristics or fields, in terms of data.
attributes
If you overwrite the ToString( ) method, you should also override the other methods of the object class.
True or False
False
An object is like a class template. The object is used to define the structure for the different classes that are going to be of that type.
True or False
False
Which of the following is NOT one of the inherited member methods of the object class?
Main( )
To design a class that is flexible and full-featured, ____.
include multiple constructors.
plush.PricePerSqYard = 40.99;
If proper naming conventions were used in the above statement, which of the following statements is true?
PricePerSqYard is a property, 40.99 is a numeric literal, plush is an object
Variables declared in the Main( ) method are ____.
only visible inside Main( ).
Class methods manipulate data by ____.
passing information as arguments through parameters.
Instance methods are ____.
nonstatic methods.
Normally data members are defined to have ____ access.
private