Object-Oriented Programming Exam Materials - 822 Verified Questions

Page 1


Object-Oriented Programming

Exam Materials

Course Introduction

Object-Oriented Programming is a foundational course that introduces students to the concepts and methodologies of designing and implementing software using the object-oriented paradigm. The course covers core principles such as classes, objects, inheritance, encapsulation, polymorphism, and abstraction. Through hands-on programming exercises and real-world examples, students will learn how to structure code for modularity, reusability, and maintainability. Emphasis is placed on solving computational problems and developing applications using an object-oriented language such as Java, C++, or Python, fostering a solid understanding of software engineering best practices.

Recommended Textbook

Programming with Microsoft Visual Basic 2017 8th Edition by Diane Zak

Available Study Resources on Quizplus

14 Chapters

822 Verified Questions

822 Flashcards

Source URL: https://quizplus.com/study-set/3209 Page 2

Chapter 1: An Introduction to Visual Basic 2015

Available Study Resources on Quizplus for this Chatper

44 Verified Questions

44 Flashcards

Source URL: https://quizplus.com/quiz/63504

Sample Questions

Q1) The Windows ____ window allows you to create the graphical user interface for your application.

A)Property

B)Solution Designer

C)Designer

D)Form Designer

Answer: D

Q2) A(n)____ is a container that stores the projects and files for an entire application.

A)window

B)solution

C)interface

D)package

Answer: B

Q3) A Visual Basic 2015 solution file will have a(n)____ file extension.

A).net

B).app

C).frm

D).sln

Answer: D

To view all questions and flashcards with answers, click on the resource link above.

Page 3

Chapter 2: Designing Applications

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63505

Sample Questions

Q1) Which of the following statements is true about printing the estimate?

A)You must specify whether the estimate will be sent directly to the printer or to a PrintPreview window.

B)The PrintForm tool displays on the form.

C)The printing task requires only one code statement.

D)You cannot keep the buttons on the interface from appearing on the printed estimate.

Answer: A

Q2) The ____ function temporarily converts a string to a number,and then returns the number.

A)Num

B)Number

C)Val

D)Value

Answer: C

Q3) The following expression should subtract 10 from the txtPrice control and then multiply the result by .07: lblSalesTax.Text = Val(txtPrice.Text)- 10 * .07

Answer: lblSalesTax.Text = (Val(txtPrice.Text)- 10)* .07

To view all questions and flashcards with answers, click on the resource link above.

4

Chapter 3: Using Variables and Constants

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63506

Sample Questions

Q1) The data entered by the users is currently stored in properties of controls of the form.Your first task to improve the application is to ____.

A)declare variables for all of the input data

B)rename the controls

C)change the layout of the form

D)add a colorful logo to the form

Answer: A

Q2) The strFirstName and strLastName variables contain the strings "Jane" and "Jones",respectively.Which of the following statements will display a string as "Jones,Jane" (the last name,a comma,a space,and the first name)in the lblFullName control?

A)lblFullName = strLastName, & strFirstName

B)lblFullName = strLastName & ", " strFirstName

C)lblFullName = strLastName & ", " & strFirstName

D)none of the above

Answer: C

Q3) Data types and classes are not related to each other.

A)True

B)False

Answer: False

To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: The Selection Structure

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63507

Sample Questions

Q1) You can include an identifying label on a group box by setting the group box's Identity property.

A)True

B)False

Q2) A programmer must phrase the condition of a selection structure so that it results in either a true or a false answer only.

A)True

B)False

Q3) If the intQuantity and decPrice variables contain the numbers 3 and 15.75,respectively,the condition If intQuantity > 0 AndAlso intQuantity < 10 OrElse decPrice > 20 will evaluate to ____.

A)True

B)False

C)Yes

D)No

Q4) What is a group box and how is it used?

Q5) What is a selection structure? What is the difference between a single-alternative and dual-alternative selection structure?

Q6) Write an If clause to determine whether the user pressed the Backspace key.

Page 6

To view all questions and flashcards with answers, click on the resource link above.

Chapter 5: More on the Selection Structure

Available Study Resources on Quizplus for this Chatper

58 Verified Questions

58 Flashcards

Source URL: https://quizplus.com/quiz/63508

Sample Questions

Q1) The Select Case statement ends with the ____ clause.

A)End

B)End Case

C)End Select

D)Select End

Q2) Write an If...Then...Else statement that assigns a discount of $5 when a customer provides a coupon during checkout.If the customer does not provide a coupon,then there is no discount.The clerk must select the Coupon Provided check box for the customer to receive the discount.Create your own variable names.

Q3) Which of the following would be an appropriate use of a check box control?

A)Marital Status (Married, Single)

B)Gender (Female, Male)

C)Full Time - Part Time

D)Insurance Benefits (Health, Dental, Vision)

Q4) You create the Random object by declaring it in a ____ statement.

A)Get

B)Dim

C)Sub

D)Private

Q5) Define the term "algorithm." How is desk-checking used to verify algorithms?

Page 7

To view all questions and flashcards with answers, click on the resource link above.

Chapter 6: The Repetition Structure

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63509

Sample Questions

Q1) If the stepValue is omitted when coding a For...Next statement,the stepValue is ____ at execution time.

A)-1

B)0

C)0.1

D)1

Q2) What is a counter-controlled loop and when is it used in a program? What statement provides the most efficient way to write a counter-controlled loop?

Q3) Each time either the user or a statement selects an item in a list box,the list box's SelectedValueChanged and ____ events occur.

A)SelectedItemChanged

B)SelectionChanged

C)SelectedIndexChanged

D)ItemChanged

Q4) ____ means assigning a beginning value to a counter or an accumulator.

A)Introducing

B)Initializing

C)Incrementing

D)Updating

To view all questions and flashcards with answers, click on the resource link above. Page 8

Chapter 7: Sub and Function Procedures

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63510

Sample Questions

Q1) The expression Math.Round(287.876,2)yields a value of ____.

A)287.87

B)287.88

C)288.00

D)290.00

Q2) Which of the following is a valid header for a procedure that is passed the number 9.75?

A)Private Function CalcSubtotal(ByVal intPrice As Integer) As Decimal

B)Private Function CalcSubtotal(ByRef intPrice As Integer) As Decimal

C)Private Function CalcSubtotal(ByVal decPrice As Decimal) As Decimal

D)Private Function CalcSubtotal(ByVal intPrice As Integer)

Q3) You pass a variable ____ when the receiving procedure needs to know the variable's contents,but the receiving procedure does not need to change the contents.

A)by reference

B)by parameter

C)by dataType

D)by value

Q4) How do the parameterList of a procedure header and the argumentList of a Call statement relate to each other?

To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: String Manipulation

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63511

Sample Questions

Q1) The Trim method is used to remove characters only from the end of a string.

A)True

B)False

Q2) The strState variable should contain two uppercase letters.Which of the following statements determines whether the variable contains a valid state?

A)If strState = "[A-Z][A-Z]" Then

B)If strState Like "[A-Z]" Then

C)If strState Like "[a-z][a-z]" Then

D)If strState Like "[A-Z][A-Z]" Then

Q3) Menu title captions should be one word only and entered using uppercase letters. A)True

B)False

Q4) Write the condition that evaluates to True when a dash (-)appears anywhere within the strItemNum variable.

Q5) What is the difference between a menu item's access key and shortcut key?

Q6) You should assign shortcut keys to every menu item.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Arrays

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63512

Sample Questions

Q1) An array is defined as follows:

Dim numbers(3) As Integer

How many elements does the array have?

A)one

B)two

C)three

D)four

Q2) Describe two advantages to using arrays to store data.

Q3) When an array is sorted in descending order,the first element in the array contains the smallest value and the last element contains the largest value.

A)True

B)False

Q4) Explain the difference between a simple variable and an array.

Q5) Assigning initial values to an array is often referred to as ____.

A)sorting the array

B)populating the array

C)assigning the array

D)declaring the array

To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Structures and Sequential Access Files

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63513

Sample Questions

Q1) Write a Structure statement that defines a structure named Order.The structure contains four member variables named strItemNum,strItemDesc,decPrice,and intQuantity.Then write the Dim statement that declares an Order variable named furniture.

Q2) Write a Structure statement that defines a structure named Vehicle.The structure contains three member variables named strMake,strModel,and intYear.Then write the Private statement that declares a Vehicle variable named truck.

Q3) Which of the following statements will read data from a sequential access file?

A)inFile.Read

B)inFile.Peek

C)inFile.ReadWrite

D)inFile.ReadLine

Q4) Write the statement that would remove the selected item from the lstFlowers control if an item is selected.

Q5) Most programmers use the Structure statement,rather than the Class statement,to create data types that contain procedures.

A)True

B)False

Q6) What is the difference between a structure and a structure variable?

Page 12

To view all questions and flashcards with answers, click on the resource link above.

Chapter 11: Classes and Objects

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63514

Sample Questions

Q1) ____ are the operations (actions)that the object is capable of performing.

A)Events

B)Attributes

C)Behaviors

D)Methods

Q2) Rather than reuse the Shoe class,you have decided to derive the Boot class from the Shoe class.Which of the following creates the derived Boot class?

A)Private Class Shoe Inherits Boot

B)Private Class Boot Inherits Shoe

C)Public Class Shoe Inherits Boot

D)Public Class Boot Inherits Shoe

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

A)True

B)False

Q4) A base class named DeliveryFee contains a function named CalcFee that calculates an order's delivery fee using the following formula: total * .05.Write the method's procedure header in the base class that will allow the derived class to override the function.

Q5) What are classes and objects? How are they used in object-oriented programming?

To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Web Applications

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63515

Sample Questions

Q1) The purpose of the ____ tool is to verify that a control contains data.

A)CompareValidator

B)RegularExpressionValidator

C)RequiredFieldValidator

D)RangeValidator

Q2) You can add an image to a Web page using the ____ tool in the toolbox.

A)Canvas

B)Paint

C)Layer

D)Image

Q3) Describe the four-step process involved in a client computer accessing ASP pages on a Web server.

Q4) Write the statement that displays the words "ABC Company" as a heading on a Web page.

Q5) ____ provide a means for a store to list its location and hours.

A)Labels

B)Static Web pages

C)Toolbars

D)Text boxes

Q6) What is the difference between a static Web page and a dynamic Web page?

Page 14

To view all questions and flashcards with answers, click on the resource link above.

Chapter 13: Working With Access Databases and Linq

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63516

Sample Questions

Q1) The ____ property (of the DataGridView)allows you to format a column's data,as well as change the column's width and alignment.

A)AutoSizeColumnsMode

B)DefaultCellStyle

C)BindingNavigator

D)DataGridView

Q2) Relational databases contain multiple tables that relate to each other in some way.How are primary and foreign keys used in such a database?

Q3) Write a LINQ statement to select the records in descending order by the Quantity field.

Q4) Write the statements to move the record pointer to the previous and next records in the dataset for the Vehicle table.

Q5) List the five objects that are placed in the component tray when a table object is bound to a DataGridView control.

Q6) Define the terms "record," "field," and "table." Provide examples of each term when you are defining them.

Q7) What are the advantages to storing data in a relational database?

Q8) What is the DataGridView control and how is it used?

To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Access Databases and SQL

Available Study Resources on Quizplus for this Chatper

60 Verified Questions

60 Flashcards

Source URL: https://quizplus.com/quiz/63517

Sample Questions

Q1) Write the statement to add a new record to the dataset.

Q2) Which of the following sorts the records for the PartsDataSet by the Price field?

A)TblPartsDataSet.Sort = "Price"

B)TblPartsBindingSource.Sort = "Price"

C)TblPartsBindingSource.Sort = Price

D)TblPartsTableAdapter.Sort = "Price"

Q3) An Insert query uses the ____ statement to add a record to a database.

A)INSERT

B)ADD

C)UPDATE

D)DELETE

Q4) If you want the records in a dataset to appear in a particular order when the application is started,you enter the Sort method in the form's ____.

A)Start event procedure

B)Load event procedure

C)Refresh event procedure

D)Click event procedure

Q5) What is SQL and how is it used?

Q6) Write the statement to sort the records in alphabetic order by last name.

Page 16

To view all questions and flashcards with answers, click on the resource link above.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Object-Oriented Programming Exam Materials - 822 Verified Questions by Quizplus - Issuu