Lecture 4 Programming Technique Programming Appreciation.

Slides:



Advertisements
Similar presentations
Topics Introduction Types of Errors Exceptions Exception Handling
Advertisements

Using Macros and Visual Basic for Applications (VBA) with Excel
Lecture Roger Sutton CO331 Visual programming 15: Debugging 1.
Lec6 P 1 CP2030 Visual Basic For C++ programmers Copyright © University of Wolverhampton CP2030 VBFC Lecture 6 Back To Index v Procedures and Parameters.
How to Debug VB .NET Code.
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Using the Visual Basic Editor Visual Basic for Applications 1.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Copyright © 2012 Pearson Education, Inc. Chapter 2 Introduction to Visual C#
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Creating a Console Application with Visual Studio
Chapter 1 Introduction to Programming and C# Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
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.
CS0004: Introduction to Programming Variables – Numbers.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 11 1 Microsoft Office Access 2003 Tutorial 11 – Using and Writing Visual Basic for Applications.
XP Chapter 7 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Enhancing User Interaction Through Programming Chapter.
Enhancing User Interaction Through Programming
® Microsoft Access 2010 Tutorial 11 Using and Writing Visual Basic for Applications Code.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Introduction to Visual Basic.NET Programming In Visual Basic.NET.
© 2006 Pearson Education 1 Obj: cont 1.3 and 1.4, to become familiar with identifiers and to understand how programming languages work HW: p.51 #1.8 –
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Program Design and Coding
Microsoft Visual Basic 2012 CHAPTER THREE Program Design and Coding.
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
ME 142 Engineering Computation I Debugging Techniques.
Visual Basic.NET BASICS Lesson 5 Exponentiation, Order of Operations, and Error Handling.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 5 Completing the Inventory Application Introducing Programming.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
FIRST JAVA PROGRAM. JAVA PROGRAMS Every program may consist of 1 or more classes. Syntax of a class: Each class can contain 1 or more methods. public.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
FT228/3 Web Development Error processing. Introduction READ Chapter 9 of Java Server Pages from O’reilly 2 nd Edition Need to be able to 1) Diagnose and.
1 Original Source : and Problem and Problem Solving.ppt.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
© 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.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter One An Introduction to Visual Basic 2008.
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.
5.01 Understand Different Types of Programming Errors
Center for Surveillance, Epidemiology, and Laboratory Services Division of Health Informatics and Surveillance José Aponte Public Health Advisor Adding.
CSE1222: Lecture 1The Ohio State University1. Computing Basics  Computers CPU, Memory & Input/Output (IO)  Program Sequence of instructions for the.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
COMPREHENSIVE Access Tutorial 11 Using and Writing Visual Basic for Applications Code.
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
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.
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
1 Problem Solving  The purpose of writing a program is to solve a problem  The general steps in problem solving are: Understand the problem Dissect the.
A variable is a name for a value stored in memory.
5.01 Understand Different Types of Programming Errors
ME 142 Engineering Computation I
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Chapter 1: An Introduction to Visual Basic 2015
Microsoft Access Illustrated
Objectives Learn about Function procedures (functions), Sub procedures (subroutines), and modules Review and modify an existing subroutine in an event.
Variables and Arithmetic Operations
5.01 Understand Different Types of Programming Errors
Learning Intention I will learn about the different types of programming errors.
Tutorial 11 Using and Writing Visual Basic for Applications Code
Presentation transcript:

Lecture 4 Programming Technique Programming Appreciation

1- 2 Finding and Fixing Errors Syntax Errors Run-Time Errors Logic Errors

Syntax Error Double-click anywhere on this line to jump to the error

1 2 3 When the compiler identifies 確定 syntax errors, it cannot continue. Click No to return to the editor and correct the error. Syntax Error

1- 5 Project Property Page Dialog The default startup object if Form1 Using Project menu, Properties change the startup object to match the new name

1- 6 Private Sub btnSpanish_Click End Sub Finding and Fixing Errors Run-Time Errors Pass syntax checking but fail to execute. e.g. divide by zero; square root of a negative number. Logic Errors Project runs but produces incorrect results. e.g. Incorrect calculation; wrong text appears. Zero build errors means that you have a clean compile.

Naming Rules: Name Property How the programmer refers to a control in code Name must begin with a letter Must be less than _________________long May include numbers and the underscore (_) Use appropriate __ character naming______ e.g. txtName, lblName

1- 8 IntelliSense Automatically pops up to give the programmer help. Intellisense anticipates your needs during coding and displays prompts to assist you in coding