QUESTION 1 What type of programming encapsulates data and functions together in
ID: 3693751 • Letter: Q
Question
QUESTION 1
What type of programming encapsulates data and functions together in an object?
Object-oriented.
Interactive.
Procedural.
Menu-driven.
None of the above.
2.5 points
QUESTION 2
What software entity contains both data and procedures?
Objects.
Instances.
Events.
Memory location(s).
None of the above.
2.5 points
QUESTION 3
The variables, arrays, or other data structures that are stored in the object are known as the object’s __________.
Records.
Methods.
Addresses.
Fields.
None of the above.
2.5 points
QUESTION 4
The procedures that the object performs are known as ____________.
Records.
Methods.
Addresses.
fields.
None of the above.
2.5 points
QUESTION 5
The programmer determines the fields and methods of an object and creates the ______ code.
Print.
Class.
Module.
Procedure.
None of the above.
2.5 points
QUESTION 6
The class _________ starts with the word Class followed by the name of the class.
body.
definition.
return.
members.
None of the above.
2.5 points
QUESTION 7
What is the term used for the fields and methods that belong to a class?
body.
definition.
return.
members.
None of the above.
2.5 points
QUESTION 8
The word Private that appears before a field declaration, in a class definition, is known as a(n) ____________.
access specifier.
specifier.
Class specifier.
Inside specifier.
None of the above.
2.5 points
QUESTION 9
The mutator methods are sometimes called _________________.
getters.
accessors.
setters.
private.
None of the above.
2.5 points
QUESTION 10
What allows you to create methods with the same name in different classes and gives you the ability to call the correct method depending on the type of object that is used to call it?
Constructor.
Inheritance.
Accessor.
Polymorphism.
None of the above.
2.5 points
QUESTION 11
________________________ is a standard way of drawing diagrams that describe object-oriented systems.
Data flow diagram.
UML.
flowchart.
Hierarchy chart.
None of the above.
2.5 points
QUESTION 12
_______________ is another name for accessor methods.
getters.
accessors.
setters.
private.
None of the above.
2.5 points
QUESTION 13
Which method is called automatically when an object is created?
design.
public.
private.
constructor.
None of the above.
2.5 points
QUESTION 14
____________________ allows a new class to extend an existing class.
successor.
accessor.
inheritance.
public.
None of the above.
2.5 points
QUESTION 15
Which of the following tasks are performed by a procedure?
Reading a file.
Gathering input.
Displaying output.
All of the above.
None of the above.
2.5 points
QUESTION 16
Which of the following are contained in a UML diagram for a class?
Class name.
Class fields.
Class methods.
All of the above.
None of the above.
2.5 points
QUESTION 17
In a UML diagram what character do you place in front of a field of method name to indicate it is public?
+.
=.
P.
-.
None of the above.
2.5 points
QUESTION 18
The act of declaring a class variable does not actually create an object in memory.
True
False
2.5 points
QUESTION 19
If a constructor is not written when the class is compiled, then a constructor is automatically provided and it is known as the default constructor.
True
False
2.5 points
QUESTION 20
When a superclass method has the same name as a subclass method, it is often said that the superclass method overrides the subclass method.
True
False
2.5 points
QUESTION 21
External entities do not have direct access to the object’s private methods.
True
False
2.5 points
QUESTION 22
When the program is running, it can use the class to create, in memory, one object of a specific type as needed.
True
False
2.5 points
QUESTION 23
The private object fields can be directly manipulated by outside entities.
True
False
2.5 points
QUESTION 24
When a class variable is assigned the address of an object, it is said that the variable references the object.
True
False
2.5 points
QUESTION 25
In an inheritance relationship, the superclass inherits members from the subclass, not the other way around.
True
False
2.5 points
QUESTION 26
When an object’s internal data is hidden from outside code and access to the data is restricted to the object’s methods, the data is protected from accidental corruption.
True
False
2.5 points
QUESTION 27
There are primarily three methods of programming in use today: procedural, recursive, and object-oriented.
True
False
2.5 points
QUESTION 28
The separation of data and the code that operates on the data can lead to problems as a program becomes larger and more complex.
True
False
2.5 points
QUESTION 29
The object’s methods are the modules and functions of the object.
True
False
2.5 points
QUESTION 30
Objects are created from abstract data types that encapsulate data and functions together.
True
False
2.5 points
QUESTION 31
Encapsulation refers to the combining of data and code into a single object.
True
False
2.5 points
QUESTION 32
A class is the ‘blueprint’ of the object that is created from it.
True
False
2.5 points
QUESTION 33
The data contained in an object are known as the object’s fields.
True
False
2.5 points
QUESTION 34
The key word New creates the object in memory.
True
False
2.5 points
QUESTION 35
The methods that can be accessed by entities outside the object are known as public methods.
True
False
2.5 points
QUESTION 36
Data Hiding refers to an object’s ability to hide its data from code that is outside the object.
True
False
2.5 points
QUESTION 37
A method that gets a value from a class’s field but does not change it is known as a(n) access method.
True
False
2.5 points
QUESTION 38
The methods in an object that are used to initialize an object’s fields with starting values are called constructors.
True
False
2.5 points
QUESTION 39
Each object that is created from a class is called a(n) instance of the class.
True
False
2.5 points
QUESTION 40
A method that stores a value in a field or changes the value of a field in some way is known as mutator method.
True
False
A.Object-oriented.
B.Interactive.
C.Procedural.
D.Menu-driven.
E.None of the above.
Explanation / Answer
1) A objectoriented
2) A object
3)D fields
4)E none of the above
correct answer is member functiions
5)B class
6)B definition
7)D members
8)A access specifier
9)B accessors
10)A constructor
11)B UML
12)A getters
13)D constructor
14)C inheritance
15)D all the above
16)D all the above
17)A +
18) True
19) True
If we donot declare a constructor the complier will create a default constructor
20) True
Because it is the definition of overriding
21) True
Because private methods scope is less and it cant be accessed by external entities
22) True
23) False
Private methods cannot be maniputaled directly.
24)True.
Variable references the object when a reference variable hols the address of object memory
25) False
In Inheritance sub class inherits the super class but the reverse is not possible.
26) True.
Because data hiding provides security
27) False.
Because the primarily methods of programming which are in use today are procedural and object oriented
28) True.
Becuase in the procedural programming the program becomes larger and more complex by the seperation of programs data and the code that operates on the data.
29) True.
30) True
31) True .
Because the definition of encapsulation is combining of data and code into a single object.
32) True.
Because according to the definition of class, class is a blue print of the object.
33) False.
Because the data contained in the object is called attributes.
34) True.
Because the new keyword is used to create a object.
35) True.
Because the public methods can be accessed from every where, it has the largest scope.
36) True.
Because data hiding means hiding the data from code that is outside the object.
37) False.
Because method that gets a value from a class field and doesnot change it is called accessor method.
38) True.
Because constructor is used to initialize the starting values of the object.
39) True.
Because according to the object definition, object is an instance of a class.
40) True.
Because mutator method stores a value in a field or changes the value of a filed.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.