Exam 11: Classes and Objects

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

In its simplest form,the Class statement can be used in place of the Structure statement.

(True/False)
4.9/5
(29)

A ____ encapsulates the attributes and behaviors of the object it creates.

(Multiple Choice)
4.8/5
(29)

Write a Class statement that defines a class named Employee.(The class contains four public variables named EmpID,LastName,FirstName,and PayRate.The EmpID,LastName,and FirstName variables are String variables.The PayRate variable is a Decimal variable. )Then write a statement that creates an Employee variable named partTime and also instantiates an Employee object,assigning it to the partTime variable.

(Essay)
4.8/5
(39)

Which of the following is a valid example of an object?

(Multiple Choice)
4.8/5
(44)

Which of the following clauses allows a derived class named Truck to have the same attributes and behaviors as its base class,which is named Automobile?

(Multiple Choice)
4.8/5
(46)

Every object has attributes and behaviors.Describe each of these,including the two types of behaviors an object can have.

(Essay)
4.7/5
(36)

A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.Write the method's procedure header in the base class that will allow the derived class to override the function.

(Essay)
4.8/5
(29)

A(n)____ is a class method whose sole purpose is to initialize the class's Private variables.

(Multiple Choice)
4.8/5
(39)

Define the term "inheritance" in object-oriented programming and describe its use.

(Essay)
4.8/5
(41)

A constructor that has no parameters is called the ____.

(Multiple Choice)
4.8/5
(28)

A method name combined with its optional parameterList is called the method's ____.

(Multiple Choice)
4.9/5
(40)

You can overload any of the methods contained in a class.

(True/False)
4.9/5
(36)

When naming the Private variables in a class,many programmers use the ____ as the first character and then use camel case for the remainder of the name.

(Multiple Choice)
4.8/5
(37)

The Lumber class definition contains two Private variables named _dblLength and _decPricePerFoot.The default constructor initializes the Private variables to 0 when the Lumber object is created.Write the statements to create a parameterized constructor,and then write the Dim statement using the parameterized constructor to instantiate and initialize the Lumber object where the number of feet of lumber is 31.5 and the price per foot is 1.85.

(Essay)
4.7/5
(38)

The Discount class is used by applications for assigning appropriate discounts to orders.A Public property within the class is made ReadOnly.Which of the following is true about this ReadOnly property?

(Multiple Choice)
4.9/5
(34)

Every object has ____,which are the characteristics that describe the object.

(Multiple Choice)
4.8/5
(33)

The code in the ____ allows an application to assign a value to the Private variable associated with the property.

(Multiple Choice)
4.9/5
(28)

____ are the actions to which an object can respond.

(Multiple Choice)
4.9/5
(42)

Write a Class statement that defines a class named Furniture.The class contains two private variables named _strItemNum and _dblPrice.Name the corresponding properties ItemNumber and Price.

(Essay)
4.9/5
(30)

Explain the difference between Public and Private variables for a class.

(Essay)
4.9/5
(32)
Showing 21 - 40 of 58
close modal

Filters

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