Module 4 Chapter Test

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

___ are special methods used to read the current state or value of an object member's data

Accessors

Which of the following is NOT a true statement relating to constructors?

The default constructor must be the first one written for the class.

In order to provide a new definition for the ToString() method,

Use the keyword ovveride in the heading

Constructors differ from other methods in that constructors ____.

Use the same identifier as the class

WriteLine("Value = {0:N0}", 12345.9032); What will be displayed from the above line?

Value = 12,346

The ToString() method is automatically invoked when an object reference is made in the ____.

Write() method

In order to test a class,

a different class is needed, invoke instance methods using the objects you contruct, use the properties to assign and retrieve values

Local variables

are defined inside Main( ) and other methods

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

Constructors ___.

can be overloaded, do not have to be written, do not return a value.

C# is an object-oriented language. All the code for an application must be placed in a(n) ____.

class

A property resembles a(n) ____, but is more closely aligned to a(n) ___.

data field, method

A class is normally associated with a(n) ____, which often describes a person, place, or thing and is normally a noun.

entity

Accessory are also referred to as ___.

getters

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

include multiple constructors

When you define a class, you can use ___ to display all public members of the class (once an object is instantiated)

intellisense

To program an object-oriented solution begin by determining what ____ are needed in the solution.

objects

Variables declared in the Main() method are ____.

only visible inside Main()

Class methods manipulate data by___.

passing information as arguments through parameters

plush.PricePerSqYard = 40.99; If proper naming conventions were used in the above statement, which of the following statements is true?

plush is an object, PircePerSqYard is a property, 40.99 is a numeric literal

Normally data members are defined to have ____ access

private

Accessors, mutators, and other instance methods are normally defined with what type of access modifier?

public

Constructors should be defined with a ___ access modifier

public

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

set

To add functionality to your classes, ____.

write more than one constructor


Set pelajaran terkait

Business, Government and Society Chapter 1

View Set

Chapter 38: Limited Liability Companies and Special Business Forms

View Set

Chapter 01: Assignment: The World of Innovative Management

View Set

AC/DC Machinery & Controls 1 Units 29-33

View Set

BIOL 322-Chapter 12: Cardiovascular Physiology

View Set

FIN 300 CH Practice 6 (Spring 2020)

View Set

testesttestetstetstettesttesttesttesttesttesettest

View Set

PICOT (Nursing), Healthcare Foundations PREP-U: Ch 2

View Set

Accounting Chapter 8: Reporting and Analyzing Receivables

View Set

Texas 30-Hour Real Estate Finance with Flex Units

View Set

fundamental Health and Physical Assessment final hesi (evolve)

View Set