1 / 64

VB.NET PROGRAMMING

VB.NET PROGRAMMING. FINAL EXAM TEST REVIEW. 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.

alton
Download Presentation

VB.NET PROGRAMMING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VB.NET PROGRAMMING FINAL EXAM TEST REVIEW

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

  3. 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

  4. 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

  5. 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

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

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

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

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

  10. The Development Cycle

  11. Storyboard

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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

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

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

  20. 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)

  21. 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

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

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

  29. 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

  30. 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

  31. 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,383characters.  • The name cannot contain punctuation or blank spaces.

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

  33. Chapter Four • 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

  34. 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

  35. 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 Four

  36. Chapter 5 Decision Making

  37. 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

  38. 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:

  39. If…Then…Else Structure Select Case Structure

  40. 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

  41. Coding a Select Case Statement

  42. Coding a Select Case Statement

  43. Chapter Five • 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

  44. 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.

  45. Chapter 6 Looping andMultiple Forms TEST REVIEW

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

  47. 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

  48. 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

More Related