Presentation is loading. Please wait.

Presentation is loading. Please wait.

Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET.

Similar presentations


Presentation on theme: "Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET."— Presentation transcript:

1 Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET

2 Overview-An Overview of Visual Basic.NET2 Methods of Programming  Procedural Languages  Constructed as a set of procedures (operational, functional units)  Often used in text-based environments  Object-Oriented  Constructed as a set of objects  Objects have data elements (i.e. properties) and perform actions (i.e. methods)

3 Overview-An Overview of Visual Basic.NET3 Object-Oriented/Event-Driven Languages  Simplifies the task of programming GUI applications.  In object-oriented/event-driven languages, the emphasis of a program is on the objects included in the user interface (such as scroll bars and buttons) and the events (such as scrolling and clicking) that occur when those objects are used

4 Overview-An Overview of Visual Basic.NET4 OOP Terminology  OOP is an acronym for object-oriented programming  It means that you are using an object-oriented language to create a program that contains one or more objects  OOD is an acronym for object-oriented design  Like top-down design, which is used to plan procedure-oriented programs, OOD is also a design methodology, but it is used to plan object- oriented programs  OOD divides a problem into one or more objects

5 Overview-An Overview of Visual Basic.NET5 Object An Object :  Is Anything that can be seen or touched  Has attributes (properties) that describe it  Has behaviors(events) that the object can either perform or have performed on it

6 Overview-An Overview of Visual Basic.NET6 Types of Controls Ch1\Program2 on p.10 (This application can be found in the student data files)

7 Overview-An Overview of Visual Basic.NET7 Starting and Customizing Visual Studio.NET  Visual Studio.NET is Microsoft’s newest integrated development environment (IDE)  Includes programming languages such as Visual Basic.NET, C++.NET, C#.NET and J#  Can Create:  A Windows-based application has a Windows user interface and runs on a desktop computer  A console application  A Web-based application, on the other hand, has a Web user interface and runs on a server

8 Overview-An Overview of Visual Basic.NET8

9 9.NET Framework New Concepts  Common Language Runtime (CLR)  Execution engine  Memory management  Intermediate Language (IL)  VB.NET compiles to IL  Just-in-time compilation

10 Overview-An Overview of Visual Basic.NET10 Language Interoperability C# VB.NET.NET: Type System Standard

11 Overview-An Overview of Visual Basic.NET11 The Programming Process (1.5) The Programming Process Consists of Several Steps, Which Include Design, Creation, Testing, and Debugging Activities

12 Overview-An Overview of Visual Basic.NET12 Example of an Object  This is a GUI object  Data includes number-of- hours-worked, hourly-pay- rate, and gross-pay-earned  Action is to calculate and display gross-pay- earned, given number-of-hours-worked and hourly-pay-rate

13 Overview-An Overview of Visual Basic.NET13 Step 1 of Developing an Application  Clearly define what the program is to do  For example:  Purpose: To calculate the user’s gross pay  Input: Number of hours worked, hourly pay rate  Process: Multiply number of hours worked by hourly pay rate (The result is the user’s gross pay)  Output: Display a message indicating the user’s gross pay

14 Overview-An Overview of Visual Basic.NET14 Step 2 of Developing an Application  Visualize the application running on the computer and design its user interface

15 Overview-An Overview of Visual Basic.NET15 Step 3 of Developing an Application  Make a list of the controls needed  Partial list: TypeNameDescription TextBoxtxtHoursWorkedAllows the user to enter the number of hours worked. TextBoxtxtPayRateAllows the user to enter the hourly pay rate LabellblGrossPayDisplays the gross pay, after the btnCalcGrossPay button has been clicked ButtonbtnCalcGrossPayWhen clicked, multiplies the number of hours worked by the hourly pay rate ButtonbtnCloseWhen clicked, terminates the application

16 Overview-An Overview of Visual Basic.NET16 Step 4 of Developing an Application  Define the Values of Each Control's Relevant Properties: Control TypeControl NameText Form(Default)"Wage Calculator" Label(Default)"Number of Hours Worked" Label(Default)"Hourly Pay Rate" Label(Default)"Gross Pay Earned" LabellblGrossPay"$0.00" TextBoxtxtHoursWorked"" TextBoxtxtPayRate"" ButtonbtnCalcGrossPay"Calculate Gross Pay" ButtonbtnClose"Close"

17 Overview-An Overview of Visual Basic.NET17 Step 5 of Developing an Application  Make a list of methods needed for each control: MethodDescription btnCalcGrossPay_ClickMultiplies the number of hours worked by the hourly pay rate These values are entered into the txtHoursWorked and txt-PayRate TextBoxes The result is stored in the lblGrossPay Text property btnClose_ClickTerminates the application

18 Overview-An Overview of Visual Basic.NET18 Step 6 of Developing an Application  Create a pseudocode version of each method:  Pseudocode is a combination of English and a programming language  For this application: Store Number of Hours Worked times Hourly Pay Rate in grossPay. Store the value in grossPay in lblGrossPay.Text.

19 Overview-An Overview of Visual Basic.NET19 Step 7 of Developing an Application  Check the code for errors:  Go step by step through the code, running it in your head as though the computer is running it  Keep track of where in the code is being executed  Keep track of the values of all of the variables

20 Overview-An Overview of Visual Basic.NET20 Step 8 of Developing an Application  Use Visual Basic.NET to create the forms and other controls identified in step 3  This is the first use of Visual Basic.NET, all of the previous steps have just been on paper

21 Overview-An Overview of Visual Basic.NET21 Step 9 of Developing an Application  Use Visual Basic.NET to write the code for the event procedures and other methods created in step 6  This is the second step on the computer

22 Overview-An Overview of Visual Basic.NET22 Step 10 of Developing an Application  Attempt to run the application - find syntax errors  Correct any syntax errors found and repeat this step as often as necessary  All of the syntax errors must be removed before Visual Basic.NET will create a program that you can actually run on the computer

23 Overview-An Overview of Visual Basic.NET23 Step 11 of Developing an Application  Run the application - once all syntax errors are fixed  Run the program with a variety of test data  Check the results to be sure that they are correct  Correct any errors found  Repeat steps 10 and 11 as many times as necessary

24 Overview-An Overview of Visual Basic.NET24 Visual Studio.NET Recent Projects Solution Explorer Dynamic Help Toolbox

25 Overview-An Overview of Visual Basic.NET25 Starting a New Project Installed.NET Products Type of Project Name and Location Of Project Name of Project

26 Overview-An Overview of Visual Basic.NET26 Visual Basic.NET Project information Properties window Toolbox (auto- hidden) Windows Form object

27 Overview-An Overview of Visual Basic.NET27 The Visual Basic.NET Environment  Design Window  Solution Explorer Window  Dynamic Help Window  Properties Window  Docked and Floating Windows  Toolbox


Download ppt "Overview-An Overview of Visual Basic.NET1 An Overview of Visual Basic.NET."

Similar presentations


Ads by Google