Exam 11: Classes and Objects

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

Only an instance of a class-not the class itself-is an object.

Free
(True/False)
4.9/5
(34)
Correct Answer:
Verified

True

Write the appropriate block of code to complete a Public procedure based on the following statements: Private _decTotalSales As Decimal Write the appropriate block of code to complete a Public procedure based on the following statements: Private _decTotalSales As Decimal

Free
(Essay)
4.8/5
(37)
Correct Answer:
Verified

A one-dimensional array's Length property is an example of a ReadOnly property.

Free
(True/False)
4.8/5
(33)
Correct Answer:
Verified

True

An application has a Private variable named _decGPA.Write the statements for the Property procedure named GPA to validate the value received from the application before assigning it to the Private variable.

(Essay)
4.8/5
(35)

You can create one class from another class.In OOP,this is referred to as ____.

(Multiple Choice)
4.9/5
(23)

A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.The derived class named InstallationFee contains the CalcFee method.However,the fee formula is as follows: (total * .05)+ 250.Write the function for the derived class.

(Essay)
4.8/5
(37)

You create a Public property using a ____.

(Multiple Choice)
4.9/5
(37)

The purpose of a(n)____ in OOP is to encapsulate the properties that describe an object,the methods that allow the object to perform tasks,and the events that allow the object to respond to actions.

(Multiple Choice)
4.7/5
(41)

What is an auto-implemented property and what does it automatically create?

(Essay)
4.8/5
(33)

A Public property procedure creates a property that is visible to any application that contains an instance of the class.

(True/False)
4.8/5
(36)

____ is useful when two or more methods require different parameters to perform essentially the same task.

(Multiple Choice)
4.9/5
(43)

Constructors never return a value,so they are always Function procedures.

(True/False)
4.8/5
(33)

In a Property procedure,the dataType must match the data type of ____ associated with the Property procedure.

(Multiple Choice)
4.8/5
(32)

What is a constructor? Explain the difference between a default constructor and a parameterized constructor.

(Essay)
4.7/5
(31)

The Tree class is derived from a base class named Plant.Which of the following statements can be used by the Tree class to invoke the Plant class's default constructor?

(Multiple Choice)
4.9/5
(32)

When a variable in a class is declared using the Public keyword,it can be used only within the class.

(True/False)
4.8/5
(31)

The Inherits clause is the keyword ____ followed by the name of the class whose attributes and behaviors you want the derived class to inherit.

(Multiple Choice)
4.9/5
(40)

A class is anything that can be seen,touched,or used;in other words,a class is nearly any thing.

(True/False)
4.9/5
(42)

A class can have multiple default constructors.

(True/False)
4.9/5
(34)

Write the code for an auto-implemented property named TaxableIncome.The property's data type is Decimal.Then list the two hidden items it creates.

(Essay)
4.9/5
(32)
Showing 1 - 20 of 58
close modal

Filters

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