Visual Basic Questions and Answers – Object Oriented Programming Terminology

This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “Object Oriented Programming Terminology”.

1. __________________ is a programming language that allows the programmer to use objects to accomplish his goals.
a) Structured programming language
b) Object-oriented programming language
c) Top-down programming language
d) Bottom-up programming language
View Answer

Answer: b
Explanation: An object-oriented programming language is a language that allows the programmer to use objects to accomplish a program’s goal. Recall that an object is anything that can be seen, touched, or used. In other words, an object is nearly any thing. The objects used in an object-oriented program can take on many different forms.

2. Each object used in a object oriented programming is created from _____________
a) Class
b) Object
c) Instance
d) User
View Answer

Answer: a
Explanation: Every object used in an object-oriented program is created from a class, which is a pattern that the computer uses to create the object. Using object oriented programming (OOP) terminology; objects are instantiated (created) from a class.

3. An object is the _____________ of the class.
a) Instance
b) Class
c) Object
d) User
View Answer

Answer: a
Explanation: Using object oriented programming (OOP) terminology, objects are instantiated (created) from a class, and each object is referred to as an instance of the class. A button control, for example, is an instance of the Button class. The button is instantiated when you drag the Button tool from the toolbox to the form.
advertisement
advertisement

4. A ______________ variable is the instance of the String class.
a) Button
b) String
c) Character
d) Array
View Answer

Answer: b
Explanation: A String variable is an instance of the String class and is instantiated the first time you refer to the variable in code. Keep in mind that the class itself is not an object. Only an instance of a class is an object.

5. ________________ are the characteristics that describe the object.
a) Classes
b) Attributes
c) Objects
d) Instances
View Answer

Answer: b
Explanation: Every object has attributes, which are the characteristics that describe the object. Attributes are also called properties. Included in the attributes of buttons and text boxes are the Name and Text properties. List boxes have a Name property as well as a Sorted property.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. _______________ are operations that the object is capable of performing.
a) Methods
b) Events
c) Instances
d) Attributes
View Answer

Answer: a
Explanation: An object’s behaviors include methods and events. Methods are the operations (actions) that the object is capable of performing. For example, a button can use its Focus method to send the focus to itself.

7. ______________ are the actions to which an object can respond.
a) Methods
b) Events
c) Instances
d) Attributes
View Answer

Answer: b
Explanation: An object’s behaviors include methods and events. Events are the actions to which an object can respond. A button’s Click event, for instance, allows it to respond to a mouse click.
advertisement

8. An object’s _______________ include methods and events.
a) Attribute
b) Behavior
c) Instance
d) Method
View Answer

Answer: b
Explanation: An object’s behaviors include methods and events. Methods are the operations (actions) that the object is capable of performing. For example, a button can use its Focus method to send the focus to itself. Events are the actions to which an object can respond. A button’s Click event, for instance, allows it to respond to a mouse click.

9. A class ______________ all the behavior and attributes of an object.
a) Encapsulates
b) Abstracts
c) Inherits
d) Instantiate
View Answer

Answer: a
Explanation: A class contains—or, in OOP terms, it encapsulates—all of the attributes and behaviors of the object it instantiates. The term “encapsulate” means “to enclose in a capsule.” In the context of OOP, the “capsule” is a class.
advertisement

10. Objects are ____________ from a class.
a) Instantiated
b) Evaluated
c) Printed
d) Outdated
View Answer

Answer: a
Explanation: Using object oriented programming (OOP) terminology, objects are instantiated (created) from a class, and each object is referred to as an instance of the class. A button control, for example, is an instance of the Button class. The button is instantiated when you drag the Button tool from the toolbox to the form. A String variable, on the other hand, is an instance of the String class and is instantiated the first time you refer to the variable in code.

Sanfoundry Global Education & Learning Series – Visual Basic.

To practice all areas of Visual Basic, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.