Programming Fundamentals Practice Exam - 822 Verified Questions

Page 1


Programming Fundamentals

Practice Exam

Course Introduction

Programming Fundamentals is an introductory course designed to provide students with a solid foundation in computer programming concepts and techniques. The course covers essential topics such as variables, data types, control structures (selection and iteration), functions, arrays, and basic input/output operations. Students will learn to design, implement, and test simple programs using a high-level programming language. Emphasis is placed on problem-solving strategies, algorithm development, and fostering logical thinking skills crucial for more advanced studies in computer science. By the end of the course, students will be equipped to tackle more complex programming challenges and continue their progression in the field.

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 most effective way to accomplish this task is to create a(n)____.

A)PictureBox control

B)splash screen

C)Label control

D)Exit button

Answer: B

Q2) Which of the following is a true statement?

A)The Me.Close() instruction should be coded in a timer control's Tick event procedure if an Exit button is not provided.

B)By default, the size of a form cannot be changed by a user while an application is running.

C)The title bar cannot be removed from an application.

D)The Minimize button can be removed from the title bar without removing the Maximize button from the title bar.

Answer: A

Q3) A source file contains a list of projects in a solution.

A)True

B)False

Answer: False

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) What is debugging? Explain the difference between a syntax error and a logic error. Answer: Debugging refers to the process of locating and correcting errors in a program.A syntax error occurs when you break one of the language rules.Most syntax errors are a result of typing errors that occur when entering instructions.A logic error can occur for a variety of reasons,such as entering instructions in the wrong order.

Q2) In most cases,an identifying label should be from one to three words only and appear on one line.

A)True

B)False

Answer: True

Q3) The number of different colors used on a form should be limited to ____ colors exclusive of black,white,and gray.

A)two

B)three

C)four

D)five

Answer: B

To view all questions and flashcards with answers, click on the resource link above. Page 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) A procedure in an application needs to store student data.The student first name,student last name,student GPA,and whether or not the student is registered all need to be stored.Write the appropriate Dim statements to declare the variables.Make sure to use appropriate naming conventions.

Answer: Dim strFirstName As String

Dim strLastName As String

Dim decGPA As Decimal

Dim blnRegistered As Boolean

Q2) The assignment operator in Visual Basic is the ____ symbol.

A)^

B)<

C)>

D)= Answer: D

Q3) Which of the following can store a number containing a decimal place?

A)Single

B)Long

C)String

D)Integer Answer: A

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) The diamond symbol is used in a flowchart for a calculation task.

A)True

B)False

Q2) Consider the expression 3 * 2 ^ 2 < 16 + 5 AndAlso 100 / 10 * 2 > 15 - 3.Which operation is performed second?

A)^

B)/ C)* D)+

Q3) The ____ operator is evaluated last in the following expression: 9 * 2 - 8 > 5 + 2 / 2.

A)B)+

C)> D)*

Q4) 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

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

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

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) Write a multiple-alternative selection structure that displays the name of an instructor based on the class section entered by the user.The class section is stored (as uppercase)in the strSection variable.Display "Edwards" when the class section is A.Display "Hughes" when the class section is B.Display "Meadows" when the class section is C.For all other sections,display "To Be Announced".Display the message in the lblMessage control.Use the If/ElseIf/Else form of the If...Then...Else statement.

Q2) A group of ____ should be used on the interface for the user to select the customer's preference for washing or dry cleaning the clothes.

A)radio buttons

B)check boxes

C)text boxes

D)labels

Q3) A selection structure that can choose from several alternatives is called a(n)____ selection structure.

A)dynamic

B)complex

C)secondary

D)extended

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) Your supervisor wants you to change the Do...Loop in the previous problem to a For...Next loop.He also wants the message to display only three times.Which of the following For clauses should you use?

A)For intCounter As Integer = 1 To 4

B)For intCounter As Integer = 1 To 3

C)For intCounter As Integer = 0 To 3

D)For intCounter = 1 To 3

Q2) A ____ structure is also referred to as a loop.

A)selection

B)sequence

C)repetition

D)recursion

Q3) In a Do...Loop statement,a condition can be phrased as either a looping condition or a loop enter condition.

A)True

B)False

Q4) 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?

Q5) Explain the difference between a looping condition and a loop exit condition.

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) What is the Math.Round function? Provide the function's syntax and define the arguments.

Q2) A form's ____ procedure is responsible for verifying that the user wants to close the application,and then taking the appropriate action based on the user's response.

A)Click event

B)FormClosing event

C)Add event

D)Button event

Q3) The ____ keyword in a function header identifies the data type of the data being returned.

A)Is

B)DataType

C)As

D)Return

Q4) Write the code to add Freshman,Sophomore,Junior,and Senior to the Class combo box.Use the SelectedItem property to make Freshman the default item.

Q5) What is the difference between a Sub procedure and a Function procedure?

Q6) What are the three main reasons programmers use independent Sub procedures?

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) To insert characters within a string,you use the ____ method.

A)Add

B)Insert

C)Mid

D)IndexOf

Q2) In order to remove both dashes from the SSN,you should first ____.

A)use the Length property to see how many characters are in the variable

B)use the index value to loop to examine each character in the variable, character by character

C)use the Contains method to see if any dashes are anywhere within the variable

D)use the Insert method to insert dashes

Q3) Programmers use the ____ property of the menu element to refer to the menu element in code.

A)Text

B)Name

C)Description

D)Title

Q4) Write the Visual Basic statement to assign the number of characters in the txtSSN control's Text property to the intSSNNumChar variable.

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) A simple variable is unrelated to any other variable in memory.

A)True

B)False

Q2) An advantage of using the For Each Next statement to process an array is that your code does not need to keep track of the array subscripts or even know the number of array elements.

A)True

B)False

Q3) When a run time error occurs,the computer displays an error message and the application ends abruptly.

A)True

B)False

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

Q5) Write the statement to declare a five-element procedure-level array named decGPA,and initialize the array with the following values: 2.58,3.85,3.6,1.45,2.75.Then write a statement to assign the number 2.55 to the last element in the array.

Q6) Write the statement that assigns the string "Treasurer" to the element located in the third row,second column in the strOfficers 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) Which of the following determines whether an item is selected in the lstTrees control?

A)If lstTrees.SelectedIndex = -1 Then

B)If lstTrees.SelectedIndex <> -1 Then

C)If lstTrees.SelectedIndex > -1 Then

D)If lstTrees.SelectedIndex < -1 Then

Q2) Which of the following declares a StreamReader variable named newFile?

A)Dim inFile As IO.StreamReader

B)Dim newFile As IO.StreamReader

C)Dim newFile As IO.StreamWriter

D)Dim newFile As StreamReader

Q3) You need to create a report using the pictureFrame.txt sequential access file.The report provides a list of all picture frames with a size of 5x7.The report will be saved as another sequential access file named pictureFrame57.txt.Your first step is to ____.

A)declare a StreamWriter variable for the output file

B)open the pictureFrame57.txt file for output using the CreateText method

C)declare a StreamReader variable for the input file

D)open the pictureFrame.txt file

Q4) What is the difference between an input file and an output file?

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

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) The Shoe class is used to create an object that represents a standard shoe.The Shoe class needs to be used in an application for boots.You have copied the Shoe.vb file into the boot application.What do you need to do next to include the file in the boot application?

A)Click PROJECT on the menu bar and then click Add Existing Item.

B)Select the Shoe.vb file from the list of filenames.

C)Click PROJECT on the menu bar and then click Add Class.

D)Click the Add button to add the file.

Q2) You can overload any of the methods contained in a class.

A)True

B)False

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

A)True

B)False

Q4) Explain the difference between Public and Private variables for a class.

Q5) When a variable in a class is declared using the Public keyword,it can be used only within the class.

A)True

B)False

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

Page 13

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

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) One drawback of dynamic Web pages is that they are not interactive.

A)True

B)False

Q2) A ____ is a computer that contains special software that "serves up" Web pages in response to requests from client computers.

A)Web server

B)client computer

C)browser

D)static Web page

Q3) When a client computer's browser sends a request for an ASP page,the Web server locates the page and then sends the appropriate ____ instructions to the client.

A)C++

B)Java

C)system

D)HTML

Q4) Describe the difference between grouping together related radio buttons on a Windows form versus a Web form.

Q5) What two properties should you specify for the RequiredFieldValidator?

Q6) Describe what happens when a user clicks the Submit button on a 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) Connecting an object to a control is called ____.

A)linking

B)Order By clause

C)LINQ

D)binding

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

Q3) A database file contained in a project is referred to as a logic database file.

A)True

B)False

Q4) The BindingSource object stores the position of the record pointer in its ____ property.

A)View

B)Position

C)Navigation

D)Cell

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

Q6) Write a LINQ statement to select all blue bicycles.Order the bicycles in ascending order by quantity.

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

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) You use the REMOVE statement to delete records.

A)True

B)False

Q2) The statement SELECT YearWon,Title,ProductionCo FROM tblMovies WHERE YearWon >= 2006 selects all of the fields from records for the year 2006 and later.

A)True

B)False

Q3) Which of the following SELECT statements will select the ItemNum and ItemDesc fields from the tblItems table?

A)SELECT ItemNum OR ItemDesc FROM tblItems

B)SELECT ItemNum AND ItemDesc FROM tblItems

C)SELECT ItemNum, ItemDesc IN tblItems

D)SELECT ItemNum, ItemDesc FROM tblItems

Q4) Write a SQL SELECT statement that selects only the records for the Senior members.Select all of the fields.

Q5) You save a query that contains the SELECT statement by associating the query with one or more methods.

A)True

B)False

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

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.