C# Ch 4 Practice Quiz

Ace your homework & exams now with Quizwiz!

public

A ____________ access modifier is always associated with constructors.

Solution Explorer

After a project has been created and a new class added to your application, you can use the ____________ Window in Visual Studio to create a class diagram.

class details

After the class diagram is created, add the names of data members or fields and methods using the_________________ section.

SIGNATURES

As with overloaded methods, ____________ must differ for constructors.

class?

By abstracting out the attributes (data) and the behaviors (processes on the data), you can create a(n) ____________ to serve as a template from which many objects of that type can be instantiated.

class

C# is an object-oriented language as such all the code that you write has to be placed in a(n) ____________.

attributes?

Fields or data members are also called ____________.

ToString( ) ? must have space?

If berber is an object, the statement Console.Write(berber); automatically invokes the ____________ method.

all of the above?

In order to test a class, ____. invoke instance methods using the objects you construct. a different class is needed. use the properties to assign and retrieve values. all of the above.

also called class methods

Instance methods are ____. -also called class methods. -defined outside of the class. -nonstatic methods. -defined in the Main( ) method.

directly accessing private data members?

Instance methods manipulate data by ____.

False

T/F A standard convention used by C# programmers is to use camel case style for property identifiers; Camel case style convention is also used for data member identifiers.

False

T/F All data types are initialized to 0 when an object is constructed.

False

T/F 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.

False

T/F Design your classes to be as flexible and full-featured as possible. One way to do this is to include multiple instance data members.

True

T/F The keyword new is used as an operator to call constructor methods.

False

T/F When you define a class method, you define its characteristics or fields in terms of the data.

false

T/F When you define a property, you can define the set without the get, but you must define a get.

True

T/F With the object-oriented approach, objects send messages to other objects and receive messages from objects.

assignment statements

The body of the constructor methods consist primarily of ____________.

set.

To define a property to change a data member of a class include a ____ clause.

define a default constructor?

To design a class that is flexible and full-featured, ____.

include multiple constructors

To design a class that is flexible and full-featured, ____.


Related study sets

Anatomy & Physiology 2- Chapter 26: The Reproductive System

View Set

Chapter 32: Animal Diversity (BIOL1510)

View Set

The Age of Reason (or The Enlightenment)

View Set

UT-Ultrasonic Examination: Article 23

View Set

(IGGY) Chapter 08: Concepts of Care for Patients at End of Life --> Ch 16

View Set

Quiz: Chapter 53, Care of the Patient with a Neurologic Disorder

View Set

Chapter 5: total cost of ownership (TCO)

View Set