Exam 8: Object-Oriented Programming

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

@occurrences is an example of a(n) ____ variable.

Free
(Multiple Choice)
4.8/5
(30)
Correct Answer:
Verified

C

Class variables begin with the ____ character.

Free
(Multiple Choice)
4.9/5
(35)
Correct Answer:
Verified

B

Local variables can begin with which of the following characters?

Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
Verified

D

With inheritance, it is possible to build an entire family of classes consisting of parents, children, grandchildren and siblings.

(True/False)
4.8/5
(50)

To use the public , private , and protected keywords, you must place them on the same line as the property or method definitions for which you wish to specify access.

(True/False)
4.9/5
(30)

The following statements provide an example of ____ methods together. testArray = [1, 2, 3, 4, 5] puts testArray.sort.reverse.inspect

(Multiple Choice)
4.8/5
(35)

The ____ keyword restricts the access of any specified properties or methods defined within the object itself.

(Multiple Choice)
4.8/5
(37)

By default, any properties and methods that you define in a class are public , which means they can be accessed from outside the class.

(True/False)
4.7/5
(42)

One way to implement ____ within Ruby is to assign the same name to different methods.

(Multiple Choice)
4.9/5
(44)

An advantage of chaining methods together is that you can perform complex tasks with a minimal amount of programming code.

(True/False)
4.9/5
(36)

Which of the following methods can be used to instantiate and initialize and object in a single step?

(Multiple Choice)
4.7/5
(37)

Access to any properties or methods that are defined after the occurrence of the public , private , and protected keywords is governed by that keyword, which remains in effect until either the end of the class is reached or a different level of encapsulation is specified.

(True/False)
4.9/5
(37)

Inheritance makes program code more reliable by limiting access to just the areas within the program where access is required, which helps prevent accidental modification or execution.

(True/False)
4.8/5
(34)

____ variables are similar to instance variables, except they are accessible to all the instances of the same class, which makes it easier to make repeated references to variables.

(Multiple Choice)
4.9/5
(37)

The ____ keyword restricts the access of any specified properties or methods to objects of the same class or objects of subclasses of the class.

(Multiple Choice)
4.9/5
(32)

____ involves the restriction of access to one or more of the properties and methods defined within a class.

(Multiple Choice)
4.7/5
(44)

____ is implemented through classes and includes the specification of both properties and methods.

(Multiple Choice)
4.8/5
(42)

Encapsulation is the ability to make important object features available while hiding nonessential details, thereby focusing on the outside view of an object.

(True/False)
4.8/5
(36)

Encapsulation allows the internal representation of objects to be hidden from view outside the object definition.

(True/False)
4.9/5
(39)

You should assign variables the lowest level of scope needed to provide the required access.

(True/False)
4.9/5
(39)
Showing 1 - 20 of 50
close modal

Filters

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