0% found this document useful (0 votes)
25 views5 pages

CSC 215 Study Guide

The document is a study guide for Visual Basic .NET, containing quiz questions and answers related to programming concepts such as imperative statements, subroutines, data types, loops, and error handling. It also includes essay questions for deeper exploration of topics like object-oriented programming and data types. A glossary of key terms is provided to clarify important terminology in the context of Visual Basic .NET.

Uploaded by

dennytissy2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views5 pages

CSC 215 Study Guide

The document is a study guide for Visual Basic .NET, containing quiz questions and answers related to programming concepts such as imperative statements, subroutines, data types, loops, and error handling. It also includes essay questions for deeper exploration of topics like object-oriented programming and data types. A glossary of key terms is provided to clarify important terminology in the context of Visual Basic .NET.

Uploaded by

dennytissy2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Visual Basic .

NET Study Guide


Quiz
Instructions: Answer the following questions in 2-3 sentences each.

1. What is an imperative statement in programming?


2. What is a subroutine, and what are some other common names for it?
3. Explain what numeric data types are and give a few examples of when they might be used.
4. What do the terms 'mod' or 'modulus' mean in programming?
5. Briefly describe the purpose of a "loop" in programming.
6. What are floating-point numbers and why are they used?
7. How are string literals typically enclosed in code?
8. What are the three keywords used to declare variable scope and what does each do?
9. Describe the difference between ByRef and ByVal when passing arguments to a function or subroutine.
10. What is the purpose of a Try...Catch...Finally block in VB.Net?

Answer Key
1. An imperative statement is a command that tells the computer to perform a specific action without relying on any prior conditions being
met. It is a direct instruction that the computer executes.
2. A subroutine is a sequence of programmed instructions that performs a specific task as a unit, and it can also be called a procedure,
function, or subprogram. It allows for modularity and code reuse.
3. Numeric data types represent numbers that can be used in mathematical calculations using standard operations. Examples include exam
marks, lengths, prices of goods, and populations.
4. The modulus operator (or mod) finds the remainder of a division operation. It returns the value left over after performing division.
5. A loop is a programming construct that allows a set of instructions to be executed repeatedly, either for a specific number of times or until a
certain condition is met.
6. Floating-point numbers represent numbers with a decimal point, where the position of the point can vary; therefore, they can represent a
wider range of values than integers.
7. String literals are typically enclosed in double quotation marks (e.g., "Hello World").
8. The keywords are Private, which declares a local variable, Static, which declares a variable that persists across procedure calls, and Public,
which declares a variable accessible from anywhere in the project.
9. ByRef passes an argument by reference, meaning changes to the argument inside the procedure will affect the original variable. ByVal
passes an argument by value, creating a copy so changes don't affect the original.
10. Try...Catch...Finally is used for error handling. The code in the Try block is monitored, Catch handles any exceptions that occur, and Finally
executes regardless of whether an exception was thrown or not.

Essay Questions
Instructions: Answer the following questions in essay format, drawing upon the provided source material.

1. Compare and contrast the use of For...Next loops and Do...Loop structures in Visual Basic .Net. Include specific examples of when one might
be more appropriate than the other.
2. Discuss the various data types available in Visual Basic .Net. Describe the storage allocation, value ranges, and use cases for at least five
different data types (numeric, string, and Boolean).
3. Explain the concept of object-oriented programming as it relates to Visual Basic .Net, including the use of classes, objects, and member
functions. Provide a detailed example.
4. Describe the importance of error handling in programming, and outline the mechanisms provided by Visual Basic .Net for handling
exceptions.
5. Compare and contrast the use of functions and subroutines in Visual Basic .Net, using specific examples to illustrate their different purposes.

Glossary of Key Terms


Algorithm: A step-by-step set of instructions to solve a problem.
Boolean: A data type that can have one of two values: True or False.

ByRef: A keyword used to pass an argument by reference to a procedure, allowing the procedure to modify the original variable.

ByVal: A keyword used to pass an argument by value to a procedure, passing a copy of the original value, and changes within the procedure do
not affect the original variable.

Class: A blueprint for creating objects, defining the data and methods that an object will have.

Compiler Directives: Instructions given to the compiler to preprocess the code before actual compilation.

Data Type: A classification that specifies the type of value a variable can hold (e.g., integer, string, boolean).

Do Loop: A loop structure that repeats a block of code either while a condition is true or until it becomes true.

Floating-point Number: A number with a decimal point; the position of the point can 'float', allowing for a wide range of values.

For Loop: A loop structure that repeats a block of code a specified number of times, using a counter variable.

Function: A procedure that performs a task and returns a value.

GUI: (Graphical User Interface) A type of user interface that allows users to interact with devices through graphical icons and audio indicator,
rather than through text.
Imperative Statement: A statement that directly instructs the computer to perform an action, regardless of any existing condition.

Integer: A whole number, that can be positive or negative but without a fractional component.

Literal: A fixed value written directly into source code (e.g., 10, "hello").

Loop: A programming structure that repeatedly executes a block of code.

Modulus (Mod): An operator that finds the remainder of a division operation.

Object: An instance of a class, representing a specific entity with defined properties and actions.

Procedure: A block of code that performs a specific task (e.g. subroutine, function).

Subroutine: A sequence of programmed instructions that performs a specific task as a unit, often called a procedure, function, or subprogram.

String: A data type that represents a sequence of characters (e.g., a text message).

Try...Catch...Finally: A block of code used for error handling, where Try monitors code, Catch handles errors, and Finally always executes.

Variable: A named storage location in memory that can hold a value, that value can be changed during program execution.

You might also like