Applications Development

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

 2005 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Written by: Dr. JJ Shepherd
The Web Warrior Guide to Web Design Technologies
12-Jun-15 JavaScript Language Fundamentals I. 2 About JavaScript JavaScript is not Java, or even related to Java The original name for JavaScript was.
Basics of ASP.NET. 2 © UW Business School, University of Washington 2004 Outline Installing ASP.NET and Web Matrix Data Types Branching Structure Procedures.
Mathematical Operators  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming in.
Java Syntax Primitive data types Operators Control statements.
Relational Operators Control structures Decisions using “if” statements  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course.
COMPUTER PROGRAMMING II SUMMER 2011 Visual Basic to C#
Chapter Three Using Variables and Constants Programming with Microsoft Visual Basic th Edition.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Visual Basic Chapter 1 Mr. Wangler.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Variables and Constants
.NET Data types. Introduction ٭ A "data type" is a class that is primarily used just to hold data. ٭ This is different from most other classes since they're.
CS0004: Introduction to Programming Variables – Numbers.
Programming with Microsoft Visual Basic th Edition CHAPTER THREE USING VARIABLES AND CONSTANTS.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Variable, Expressions, Statements and Operators By: Engr. Faisal ur Rehman CE-105 Fall 2007.
© 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.
Multiple Forms, Container Controls, AddHandler This presentation is based on the Forms and ContainerControls VB Projects 1.
Language Elements 1. Data Types 2 Floating Point (real) Single Precision Double Precision Decimal Fixed Point (integer) Byte Short Integer Long Numerical.
CS0004: Introduction to Programming Variables – Strings.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
VB and C# Programming Basics. Overview Basic operations String processing Date processing Control structures Functions and subroutines.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
COMPUTER PROGRAMMING II SUMMER 2011 Visual Basic to C#
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Copyright Curt Hill Variables What are they? Why do we need them?
Variables & Function Calls. Overview u Variables  Programmer Defined & Intrinsic  Data Types  Calculation issues u Using Functions  The val() function.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 5.1 Test-Driving the Inventory Application.
Chapter-1 Introduction to Visual Basic GUI- A GUI is a graphical (rather than purely textual) user interface to a computer. The term came into existence.
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 for Application - Microsoft Access 2003 Programming applications using Objects.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Programming with Microsoft Visual Basic th Edition
Object Oriented Software Development 4. C# data types, objects and references.
110 E-1 Variables, Constants and Calculations(2) Chapter 3: Operations on variables, scope of a variable, formatting data Doing Arithmetic.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Controlling Program Flow with Decision Structures.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Dr. Sajib Datta Jan 21,  Declare a variable ◦ int height; [note that no value is still assigned]  Assign a variable a value ◦ height =
JavaScript Tutorial. What is JavaScript JavaScript is the programming language of HTML and the Web Programming makes computers do what you want them to.
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.
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”
 2001 Prentice Hall, Inc. All rights reserved. Outline 1 JavaScript.
.NET MCQs MULTIPLE CHOICE QUESTION
Visual Basic Fundamental Concepts
Visual Basic.NET Windows Programming
Introduction to Programming Lecture 2
IE 8580 Module 4: DIY Monte Carlo Simulation
A variable is a name for a value stored in memory.
Objects as a programming concept
Chapter 4 Assignment Statement
3 Introduction to Classes and Objects.
Chapter 1: An Introduction to Visual Basic 2015
2.5 Another Java Application: Adding Integers
Chapter 3 Assignment Statement
Variables and Arithmetic Operations
Visual Basic..
Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline Test-Driving the Microwave Oven Application Designing.
WEB PROGRAMMING JavaScript.
Presentation transcript:

Applications Development Using VB .Net Note: The prerequisits of this course are CMP210, CMP218 or CMP219 and CMP252

Learning new languages

Computer Programming Languages Can be classified into two basic types Object Oriented Programming Procedural Programming Each computer language classified under each “type” will follow specific guidelines. knowing the specific guidelines within a language type will help in learning the different languages within each type.

Computer Programming Languages (Continued) Procedural Languages Examples include PASCAL C COBALD Follow a top down design Object Oriented Languages Follow OOD (Object Orient Design) C++ Java VB .Net

Object Oriented Languages Overview (Review questions) Some questions that should be answered as a review. What is OOP (Object Oriented Programming)? What are Data Types (Primitive and Abstract)? What is the String Data Types and its associated methods? How do you convert numeric data from a String to a Primitive data type? What is the difference between a class and an object? What are attributes? What are methods? What is a constructor? What is an Accessor? What is a Mutator/Modifier? What is inheritance? What are loops? What is Exception Handling and Why is it used? What does public and private mean? What are control structures (if and switch statements) What are the following operators Assignment? Math? Comparison/Logical? Boolean?

Classes in OOP Are object descriptions Contain both attributes and methods Attributes are data types that describe the object Can be both Primitive data types and other classes Can be public or private Methods are the actions that the object can do Three types of methods Constructor Accessor Mutator/Modifier Every method contains a specific format Every method contains an accessibility (public/private) Every method contains a parameter lists (lists can be empty) Every method contains a return type (can be void or nothing)

Comparing VB .net and Java Learning VB .net Comparing VB .net and Java

Similarities of VB .net and Java Both are object oriented Both have public and private methods and attributes in a class Both use exception handling Both are event driven programming languages

Noticeable differences between Java and VB .net VB .net does not use semicolons VB .net does not use curly braces VB .net is not case sensitive VB .net contains both Sub Procedures and Functions VB .net primarily contains a visual interface for the programmer VB .net runs on multiple platforms containing the VB .net environment Every program in this class will start off with a form.

Primitive Data Types in Java int float double boolean byte char Long Etc.

Primitive (elementary) Data Types in VB .Net Integer Boolean Decimal Date Double Char String Etc.

Converting Data Types in VB .net Functions are used to convert text (String) data to numeric data These functions include CInt() CDec() CLng() Etc. (in text on page 485) These functions in VB .net behave much like the parsing methods in Java.

Operators in VB .net Math Assignment + - * / Mod (Modulus or Remainder) Assignment =

Operators in VB .net (continued) Comparison = (the same as assignment) < <= > >= <> (Not equal) Boolean (uses words not symbols) And Or Not

Variable declarations in VB .net vs. Java In java the data type is placed before the label int num1; In VB .net All variable declaration requires the keyword Dim (stands for Dimension) the label is placed in front of the data type Option Explicit and Option Strict should be also turned on at the top of every class Dim num1 As Integer

Method Syntax in Java public int Sum3 (int num1, int num2, int num3) { int answer; answer = num1 + num2 + num3; return answer; } The return type is an integer The number of parameters are 3 integers The method is public

Methods in VB .net VB .net have two specific types of methods for classes Each method could still be A Constructor of a class An Accessor of a class (Called Property get) A Mutator/Modifier of a class (Called Property set) The two specific types are Sub procedures (do not return a value) Functions (return a value)

Functions in VB .net Functions can be both public and private Functions return a value The return type of the Function is always at the end of the method heading (different than Java) Only one value may be returned from a Function Functions contain a parameter list

Method (functions) Syntax in VB .net Public Function Sum3(num1 As Integer, num2 As Integer, num3 As Integer) As Integer Dim answer As Integer answer = num1 + num2 + num3 return answer End Function This Function is public This Function contains 3 parameters of type Integer This Function has a return type of an Integer

Specifics for developing windows applications VB .Net Specifics for developing windows applications

Forms in VB .Net Every form in VB .net is a class Forms have default attributes (properties) and methods (sub procedures and functions) Properties can be set with the properties Window in the .net development environment

Forms in VB .net (Continued) Properties that can be set are Text (Title in the title bar) Background color Name of the form (Like java should match the name of the file (class name) Size Icon (in the Title bar) Etc. Forms can also have attributes (properties) and methods (Functions and Sub Procedures) added to them

Controls in VB .net Items added to the form such as text boxes are called controls Each control added to a form becomes an attribute of that form (or part of the form) Each Control is an Object and have Attributes (properties) Methods (Functions and Sub-Procedures)

Controls in VB .net (Continued) All properties can be set by using the properties window for each control. Controls in VB .net include Text Boxes Buttons Data Grids Etc.

Text Boxes Used for entering text for a windows application ALL Data entered in the text box is a String (like with JOptionPane) All numeric data must be converted with the methods described earlier The Text attribute will hold the Data entered into the text box

Events and Windows Applications Windows is an event driven operating system (Flow of control is driven by events that occur) Events are messages that are passed to applications and objects when something in the program occurs Events can be a mouse click, positions of the Mouse etc.

Buttons and Event handling By double clicking on the Button control on the form, sub program headings for handling the click event are inserted. All code that is entered into the event handler will only execute in the program when the button is clicked. another event that is handled in programs written in class is the Form load event.

Control Structures in VB .net Similarities and differences between Java and VB .Net

If statements in Java if (num1 == 4) { System.out.println(“num1 is 4”); }else System.out.println(“num1 isn’t 4”); }

If Statements in VB .net If num1 = 4 Then MessageBox.Show(“num1 is 4”) Else MessageBox.Show(“num1 isn’t 4”) End If

VB .net If statements (continued) Again no semicolons No curly braces End If ends the if statement Single equal sign is used for comparisons and assignments