Quiz 3 - Quiz PDF

Title Quiz 3 - Quiz
Course Database
Institution Algonquin College
Pages 8
File Size 218.6 KB
File Type PDF
Total Downloads 10
Total Views 187

Summary

Quiz...


Description

on 1 (1 point) Within any object-oriented program, you continuously make requests to an object's methods, often including arguments as part of those requests. Question 1 options: True False

Declaring a class does not create actual objects. Question 2 options: True False

Question 3 (1 point) Saved Class diagrams consists of a rectangle divided into three sections. Question 3 options: True False

Question 4 (1 point) Saved The accessor method is another name for the set method. Question 4 options: True False

uestion 5 (1 point)

Saved Object-oriented programmers usually specify that their data fields will have private access. Question 5 options: True False

Question 6 (1 point) ____ is a programming model that focuses on an application's components and data and methods the components use. Question 6 options: Classical programming Functional programming Procedural programming Object-oriented programming

uestion 7 (1 point) Saved Object-oriented programmers sometimes say an object is one ____ of a class. Question 7 options: enumeration instantiation method reference

Question 8 (1 point)

Objects both in the real world and in object-oriented programming contain ____ and methods. Question 8 options: behaviors attributes help primitive data types

Question 9 (1 point) The data components of a class that belong to every instantiated object are the class's ____. Question 9 options: numeric variables string variables instance variables class variables

Question 10 (1 point) Saved Instance variables are often called ____ to help distinguish them from other variables you might use. Question 10 options: rows records columns fields

Question 11 (1 point) What mechanism does an object use to store its data? Question 11 options: files methods instance variables access specifiers

uestion 12 (1 point) Saved Each object of a class has its own set of ___. Question 12 options: methods instance variables constructors classes

uestion 13 (1 point) Saved An instance variable declaration consists of which of the following parts? Question 13 options: the return type, the name of the method, and a list of the parameters(if any). an access specifier, the type of the instancevariable, and the name of the instance variable. an access specifier, a list of the parameters (if any), and the bodyof the method. the type of the instance variable, an access specifier, a list of theparameters (if any), and the body of the method.

Next Page

Question 14 (1 point)

Saved The access specifier in the declaration of instance variables shouldbe ___. Question 14 options: protected class public private

Question 15 (1 point) Saved What statement is used to specify the value that a method gives backto its caller? Question 15 options: new public private return

Question 16 (1 point) Saved Which statement about private instance variables is true? Question 16 options: They can only be accessed by methods of a different class They can only be accessed by methods of the same class They cannot be accessed by methods of the same class They can only be accessed by the constructor of the class

Question 17 (1 point) Saved Encapsulation allows a programmer to use a class without having to know its ____. Question 17 options: interface name methods implementation

Question 18 (1 point) Saved Which statement describes a central benefit of information hiding? Question 18 options: Easier to change the private implementation Easier to change the method headers Easier to change the name of the class Easier to change the public interface

Question 19 (1 point) Saved A method header consists of which of the following parts? Question 19 options: the return type, the name of the method, and a list of the parameters(if any) an access specifier, the type of the instance variable, and the nameof the instance variable the type of the instance variable, an access specifier, and a list ofthe parameters (if any) an access specifier, a return type, a method name, anda list of the parameters (if any)

Question 20 (1 point)

Saved Which part of a class implementation contains the instructions to initializean object's instance variables? Question 20 options: constructor access specifier initializer type name

Question 21 (1 point) Saved What is the diagram type we are learning to use in UMLet? Question 21 options: UML Class Diagram UML Sequence Diagram UML Activity Diagram UML Deployment Diagram

Question 22 (1 point) Saved What is the name of the template item for creating a simple UML class diagram? Question 22 options: ActiveClass SimpleClass AbstractClass...


Similar Free PDFs