VB.NET PROGRAMMING FINAL EXAM TEST REVIEW.

Slides:



Advertisements
Similar presentations
Working with Intrinsic Controls and ActiveX Controls
Advertisements

Information System Design Lab 5&6. User Interface Design.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Automating Tasks With Macros
Using Visual Basic 6.0 to Create Web-Based Database Applications
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Adding Automated Functionality to Office Applications.
Copyright © 2001 by Wiley. All rights reserved. Chapter 3: Variables, Assignment Statements, and Arithmetic Variables Assignment Statements Arithmetic.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter One An Introduction to Visual Basic 2010.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Visual Basic Chapter 1 Mr. Wangler.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Introduction to VB.NET Tonga Institute of Higher Education.
05/09/ Introducing Visual Basic Sequence Programming.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Microsoft Visual Basic 2005 CHAPTER 4 Variables and Arithmetic Operations.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Visual Basic Programming Chapter Six Notes Repetition and the Do Statement ADDING ICONS TO YOUR FORM –It is possible to add an ______________ to your title.
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
Visual Basic Programming Introduction VB is one of the High level language VB has evolved from the BASIC language. BASIC stands for Beginners All-purpose.
Variables & Function Calls. Overview u Variables  Programmer Defined & Intrinsic  Data Types  Calculation issues u Using Functions  The val() function.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Introduction to Scripting.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Programming with Microsoft Visual Basic th Edition
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
Variables and Expressions Programming Right from the Start with Visual Basic.NET 1/e 7.
Controlling Program Flow with Decision Structures.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
Internet & World Wide Web How to Program, 5/e © by Pearson Education, Inc. All Rights Reserved.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 2 The Visual Basic.NET Integrated Development Environment.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Making Interactive Programs with Visual Basic .NET
Chapter 4.  Variables – named memory location that stores a value.  Variables allows the use of meaningful names which makes the code easier to read.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are used in programs so that values can be represented with.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
Visual Basic.NET Windows Programming
A variable is a name for a value stored in memory.
Microsoft Access Illustrated
Using Procedures and Exception Handling
VISUAL BASIC FINAL EXAM REVIEW SHEET
Computer Programming.
Variables and Arithmetic Operations
Visual Basic.
CIS16 Application Development Programming with Visual Basic
Visual Basic Programming Chapter Four Notes Working with Variables, Constants, Data Types, and Expressions GROUPBOX CONTROL The _____________________________________.
T. Jumana Abu Shmais – AOU - Riyadh
Building an Application in the Visual Basic .NET Environment
CIS 16 Application Development Programming with Visual Basic
VB.NET PROGRAMMING FINAL EXAM TEST REVIEW.
Introduction to Problem Solving and Control Statements
Introduction to Programming
Looping and Multiple Forms TEST REVIEW
Presentation transcript:

VB.NET PROGRAMMING FINAL EXAM TEST REVIEW

An Introduction to VB.NET and Program Design Chapter 1 Review An Introduction to VB.NET and Program Design

Chapter One Review Step-by-step series of instructions telling the computer what to do. A Program The process of writing these instructions is called what? Programming

Chapter One Review People who design and write programs Programmers or software developers A collection of one or more programs Applications The process of writing applications Program Development

What is Microsoft Visual Basic .NET? A programming environment that allows you to build programs for the Windows operating system or any system that supports Microsoft’s .NET architecture. VB.NET VB.NET is based on the what programming langauge? Visual Basic which evolved from BASIC The process of writing a program using a programming language is called what? Coding

Programming and Application Development Store program Machine Cycle – how a computer processes information -- 4 Steps! Fetch Decode Execute Store

Application Types Runs in a Windows Environment. Has a user-interface Windows Applications

Application Types Runs from your web browser. Converts the VB to HTML. Has a user-interface. Web Applications

Application Types Have a user-interface. Runs from a command prompt. Console Applications

The Development Cycle

Storyboard

The Visual Basic .NET Integrated Development Environment Chapter 2 The Visual Basic .NET Integrated Development Environment

Starting Visual Basic .NET The part of the VB.NET application that contains windows and toolbars that allow you to develop applications. Integrated Development Environment (IDE) A collection of code and other files that usually encompasses one program. Project

Chapter Two When the IDE is in ________ _______, you can make modifications to the forms and code of a program. Design Time Displays the VB.NET menu names each of which represents a list of commands that you allow you to create, edit, save, print, test and run VB.NET applications. Menu Bar

Chapter Two Contain shortcuts to commonly used commands. Standard and Layout are two most popular toolbars. Toolbars A grouping of projects and related files. Solutions can contain one project, like this take-home pay calculator, or many related projects, data files and graphic files. Solution

Chapter Two To test a project you _________ it. This is usually done by clicking the start button on the standard toolbar. RUN By running your project during the development phase, you can check for problems, or ________, that you may have introduced into your code inadvertently. BUGS The process of getting your code to work as expected is known as ____________. DEBUGGING

Chapter Two A characteristic or attribute of an object, such as its background color or the text that it displays. PROPERTY The ______________ lists the attributes for the object currently selected in the main work area. PROPERTIES WINDOW The Properties Windows has two parts: __________ ______ -- displays the name of the currently selected object or control. OBJECT BOX __________ ___________ – displays the list of properties associated with the currently selected object or control. PROPERTIES LIST

Building an Application in Visual Basic.NET Chapter Three Building an Application in Visual Basic.NET

Building an Application in the Visual Basic .NET Environment Chapter 3 Building an Application in the Visual Basic .NET Environment

Chapter Three The UI is the way the a program accepts data and instructions from the user and produces results. User Interface A ___________________ provides visual cues such as a menu, a button, or small pictures (called icons) to help the user enter data and give instructions to the computer. Graphical User Interface (GUI)

Chapter Three A control is said to have _____________ when it is selected on the screen. FOCUS Used to set the position where the application will display on run. StartUpPosition Allows you to set the title for a form. Text Property Controls the appearance of the border of a form. FormBorderStyle Sets the background and foreground colors for the form. Background and Foreground

Chapter Three Objects that you can add to your form.They are found on VB.Net’s Toolbox CONTROLS Displays text on the form that cannot be altered by the end user. LABEL CONTROL Displays text on the form that can be altered by end user. TEXTBOX CONTROL Used by the user to initiate actions called events. BUTTON CONTROL Used to display or allow users to enter numbers on a form. Cuts down on user’s ability to screw things up. NUMERIC UP DOWN CONTROL

Chapter Three Allows you to rename the object to something that makes more sense. Name Allows you to change the words that show up on the control itself. (or on the title bar of the form!). Text Makes it impossible for the end user to edit the text in that box. Read Only

Chapter Three Allows the programmer to control the order in which the control gets the focus when the user is tabbing. TAB INDEX Allows the programmer to have a control skipped during tabbing. TAB STOP NUMERIC UP/DOWN BOXES Defines the current value displayed in the control VALUE PROPERTY Allows the programmer to define the upper and lower boundaries for the values in a NUD control. MIN AND MAX PROPERTIES

CHAPTER THREE Programmers often add comments within their code as a form of internal documentation. These are known as: REM LINES or Comment Statements Each comment line must begin with an ______________ or the letters ____ – which is short for “remark”. APOSTROPHE OR REM

Chapter Three Messages sent to an object EVENTS Default event for buttons. Code will execute when user Clicks on the button. CLICK EVENT Instructions to the computer written at design time for the computer to execute at run time CODE STATEMENTS

Writing Code in the Code Window An error caused by code statements that violate one of the structure or syntax rules of the Visual Basic .NET language SYNTAX ERROR Event procedures for controls start with the word _____________ since the section is just for that one control. PRIVATE SUB The line that begins ____________ indicates the end of a particular event procedure. END SUB

Working with Variables, Constants, Data Types and Expressions CHAPTER FOUR Working with Variables, Constants, Data Types and Expressions

Chapter Four Presents a set of choices. Only one can be chosen at a time. Often placed in a group box. RADIO BUTTONS Property that keeps track of which radio button is selected. CHECKED PROPERTY Allows you to set a default button for a form. ACCEPTBUTTON PROPERTY

Chapter Four Represents a location in computer memory that can change values as the code executes. VARIABLE Represents a location in computer memory that cannot be changed during execution. CONSTANT

Chapter Four The ___________ of a variable or constant determines what kind of data it can store. DATA TYPE Name three common data types: INTEGER, DOUBLE, STRING There are rules to naming your variables: The name must begin with a letter, not a # ! The name cannot be more than 16,383 characters.  The name cannot contain punctuation or blank spaces.

Chapter Four Some variable Naming Conventions: Short == shr Integer == int Single == sng Double == dbl String == str Object == obj

Chapter Four GLOBAL VARIABLES Keyword used to declare a variable. DIM Refers to a variables ability to be accessed throughout a program. It is defined by where the variable is declared. SCOPE Variable that are available to all the procedures on a given form. GLOBAL VARIABLES

Chapter Four Predetermined order for performing calculations within an expression. ORDER OF OPERATIONS Arithmetic operators in Visual Basic ^ -- used to raise the power of an exponent * -- used to multiply two numbers / -- used to divide 2 #’s and return a decimal result \ -- used to divide 2 #’s and return an integer result MOD -- Used to divide 2 #’s and return only the remainder + -- used to sum 2 #’s - -- Used to subtract 2 #’s or indicate a negative value

Chapter Four Functions that are built into .NET. INTRINSIC FUNCTIONS This is a financial function that will return the payment for a loan based on periodic, constant payments and a constant interest rate. PMT FUNCTION Function that allows the programmer to determine how the output will appear on the screen. FORMAT FUNCTION

Chapter 5 Decision Making

Chapter Five Used in Windows applications to present lists of choices. Uses the prefix cmb. COMBO BOX CONTROL Used to build the list inside the combobox. ITEMS PROPERTY Used when there are more than two options in a decision making structure! SELECT CASE Provides the ability to display a message to the user in a pop-up window. MESSAGE BOX

Chapter Five When you add items to a ComboBox List VB.Net assigns each one an unique index number. The first item is assigned an index of 0; the second item gets an index of 1; and so on. For example: Index Numbers for Auto Loan Program A -- Excellent Credit Rating = 0 B – Good Credit Rating = 1 etc …. SelectedIndex is the property that keeps track of what index number is currently being accessed. When no item is selected, the SelectedIndex property is set to -1. The following line of code would clear the ComboBox:

If…Then…Else Structure Select Case Structure

Chapter Five Used to execute one statement or another conditionally. IF THEN STATEMENTS The condition follows the keyword IF A condition is made up of two expressions and a relational (comparison) operator. Equal = Less than or equal to <= Less than < Greater than or equal to >= Greater than > Not equal to <> When you have an if…then within an if then! NESTED IF THEN STATEMENTS

Coding a Select Case Statement

Coding a Select Case Statement

Chapter Five If strGender = “M” And intAge < 12 Then Used to combine two or more conditions in an expression. All parts must be true for the True section of code to trigger! AND LOGICAL OPERATOR For example: If strGender = “M” And intAge < 12 Then MessageBox.Show(“Boys Little League”) End if

Chapter Five The process of adding strings together. It is performed with the ampersand [ &] character. CONCATENATION The plus sign (+) can be used instead of the (&) operator. Often times programmers avoid the + sign since it is used in mathematical problems as well.

Looping and Multiple Forms TEST REVIEW Chapter 6 Looping and Multiple Forms TEST REVIEW

QUESTION 1: It’s possible to add an icon to your title bar by setting the form’s ____________ property. Answer: ICON

QUESTIONS 2 & 3: Determines how items display in the ListView Control. ANSWER QUESTION 2: VIEW PROPERTY Switch to __________ if you want multiple columns to show up in the listview control. ANSWER QUESTION 3: DETAILS

QUESTION 4: Rather than having to code changes for the width, height, and location of every control, VB.NET allows you to set a fixed location, or _____________, for controls to specified sides of a form. ANSWER ANCHOR

QUESTIONS 5 & 6: Most .NET applications contain more than one form. ANSWER: TRUE If the first form is used to launch the second form it is sometimes referred to as the __________. ANSWER PARENT

QUESTIONS 7 & 8: The ________________________ is used in applications to allow a user to specify one of two conditions, such as on or off, yes or no, or true or false. ANSWER CHECKBOX CONTROL Determines whether the box is checked or not. It’s either True or False. CHECKED PROPERTY

QUESTION 9: Well, as is the case with all forms, the Today’s Sales Entry Form is a ____________, which means that an instance of the class must be declared before it can be used. This can be done with an _________________________. ANSWER CLASS OBJECT VARIABLE

QUESTIONS 10 & 11: ANSWER NEW KEYWORD The _______________________ determines whether the variable contains a complete instance of the object. ANSWER NEW KEYWORD If the New keyword is not used, then the variable is declared for future use but no memory is set aside for the contents of the object. If the New Keyword is used, the object is said to be _____________________ and memory is set aside for a complete copy of the object. You can’t use a new form until this is done. Answer INSTANTIATED

QUESTIONS 12 & 13 If the __________________ is used in a form’s code to open another form, then both forms still can receive focus and be accessed by the user. This is called a ____________________ – meaning that the user can flip back and forth between the forms. ANSWERS Show() Method, modeless The ______________________ is used to open a ________________ form. This means that the user must complete the action on the modal form before they will be allowed to continue work on other forms. Show Dialog(), modal

QUESTION 14 One of the most powerful aspects of computer programming is the capability of performing a set of operations repeatedly based on certain conditions. In programming, the process of repeating a set of instructions is known as ______________. ANSWER LOOPING OR REPETITION

QUESTION 15: This statement repeatedly executes a series of statements in the loop as long as the condition is true. ANSWER: DO WHILE Two examples: (one tests at the top of the structure, one tests at the bottom of the structure) Do While intCount <=20 Do intCount = intCount +1 intCount = intCount +1 Loop Loop While intCount <=20

QUESTION 16: This statement loops until the condition becomes true. ANSWER: DO UNTIL Two examples: (one tests at the top of the structure, one tests at the bottom of the structure) Do Until intCount >= 20 Do intCount = intCount +1 intCount = intCount +1 Loop Loop Until intCount >= 20

QUESTIONS 17 & 18: A __________________ is a group of one or more objects that can be accessed and operated on as a single entity. ANSWER: COLLECTION VB.NET assigns an unique ____________ to each item in a collection. This comes in handy when writing code for a ListView Control. ANSWER INDEX NUMBER

QUESTIONS 20, 21 & 22: __________________ – this property always displays as the first column in the ListView Control. If you have more than one column in a ListView control, a ________________ collection is created. Each Item and SubItem has an ___________________ ANSWERS TEXT PROPERTY SUBITEMS INDEX PROPERTY

QUESTION 23 & 24 For Example lstTodaysSales.Items(1).Text = _______________ lstTodaysSales.Items(0).SubItems(2).Text = ________

QUESTIONS 25 & 26: Loop that has an automatic counter and condition built in. ANSWER: FOR …. NEXT LOOP List Three Benefits of For … Next Loops: More efficient than a Do While Loop Easier to read Uses less memory Faster execution

QUESTIONS 27 & 28: For example: The ___________________ allows you to retrieve part of a string (from a larger string) based on a start position and the number of characters to retrieve. ANSWER SUBSTRING METHOD For example: strExample = “Christy Garrett” strLastName = strExample.Substring ( ___ , ___) (8, 7)

STUDY, STUDY, STUDY THE TEST CAN BE TOUGH! MAKE SURE YOU READ OVER ALL OF YOUR NOTES!