ERRORS. Types of errors: Syntax errors Logical errors.

Slides:



Advertisements
Similar presentations
IT 325 OPERATING SYSTEM C programming language. Why use C instead of Java Intermediate-level language:  Low-level features like bit operations  High-level.
Advertisements

Chapter 15 Debugging. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Debugging with High Level Languages.
Ch13QQ T F 1. The first step in the program development life cycle (PDLC) is problem analysis. T F 2. The use of structured programming typically.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. OBJECTIVES FOR THIS UNIT Upon completion of this unit, you should be able to: Explain the Java virtual machine.
A Review. a review of lessons learned so far… ( 2 steps forward - 1 step back) Software Development Cycle: design, implement, test, debug, document Large.
Programming Languages: Notes for Class Discussion: V Deena Engel’s class.
Exceptions Three categories of errors: Syntax errors Runtime errors Logic errors Syntax errors: rules of the language have not been followed. Runtime error:
School of Computing Science CMT1000 Ed Currie © Middlesex University Lecture 2: 1 CMT1000: Introduction to Programming Ed Currie Lecture 2B: Programming.
1 Grammars. 2 Grammars express languages Example: the English language.
HTML Recall that HTML is static in that it describes how a page is to be displayed, but it doesn’t provide for interaction or animation. A page created.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Testing a program Remove syntax and link errors: Look at compiler comments where errors occurred and check program around these lines Run time errors:
Introducing Java.
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.
Chapter 1: Creating Java Programs
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Programming Lifecycle
Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives.
Board Activity Find your seat on the seating chart Login – Remember your login is your first initial your last name and the last three numbers of your.
2_Testing Testing techniques. Testing Crucial stage in the software development process. Significant portion of your time on testing for each programming.
1 Context-Free Languages. 2 Regular Languages 3 Context-Free Languages.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 Debugging. 2 A Lot of Time is Spent Debugging Programs Debugging. Cyclic process of editing, compiling, and fixing errors. n Always a logical explanation.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
Errors “Computer says no..”. Types of Errors Many different types of errors new ones are being invented every day by industrious programming students..
Parse & Syntax Trees Syntax & Semantic Errors Mini-Lecture.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
Procedural Programming Criteria: P2 Task: 1.2 Thomas Jazwinski.
Basic Programming Lingo. A program is also known as a  Sequence of instructions  Application  App  Binary  Executable.
1 Program Planning and Design Important stages before actual program is written.
The Functions and Purposes of Translators Syntax (& Semantic) Analysis.
Debugging Logic Errors CPS120 Introduction to Computer Science.
Chapter 1 Introduction. Chapter Goals To understand the activity of programming To learn about the architecture of computers To learn about machine code.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
School of Computer Science & Information Technology G6DICP - Lecture 6 Errors, bugs and debugging.
Java FilesOops - Mistake Java lingoSyntax
C H A P T E R T H R E E Type Systems and Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
1 Exceptions. 2 Syntax Errors, Runtime Errors, and Logic Errors syntax errors, runtime errors, and logic errors You learned that there are three categories.
Jeopardy $100 VariablesErrorsLoops Classes and Objects Program Structure $200 $300 $400 $500 $400 $300 $200 $100 $500 $400 $300 $200 $100 $500 $400 $300.
Software Development Cycle From Wikipedia: fe-cycle
Exception. Agenda Exception. Handling Exceptions. The finally Clause.
For Monday Read pages Do exercise 1.1 on page 46 (to hand in – may be done in groups of up to 4) Complete WebCT quiz.
Grammar Police Arresting English Errors. STOP! THIS SENTENCE IS UNDER ARREST! IT SHOULD BE… STOP! THIS SENTENCE IS UNDER ARREST! IT SHOULD BE… I have.
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Wrapper Classes Debugging Interlude 1
Introduction to Computers and C++ Programming
John Woodward A Simple Program – Hello world
ME 142 Engineering Computation I
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Software Design and Development
2_Testing Testing techniques.
TRANSLATORS AND IDEs Key Revision Points.
CSE322 LEFT & RIGHT LINEAR REGULAR GRAMMAR
High Level Programming Languages
Unit 1: Introduction Lesson 1: PArts of a java program
Algorithm Correctness
Programming Errors Key Revision Points.
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Lecture 8 Programming Paradigm & Languages. Programming Languages The process of telling the computer what to do Also known as coding.
Learning Intention I will learn about the different types of programming errors.
Perl Programming Dr Claire Lambert
1.7 Errors Compile-time error: A violation of the programming language rules that is detected by the compiler Example: System.ou.println("Hello, World!);
Chapter 15 Debugging.
Dasar-Dasar Pemrograman 2: Java Basics
Chapter 15 Debugging.
Presentation transcript:

ERRORS

Types of errors: Syntax errors Logical errors

Syntax errors: In English, a mistake in the grammar rules of the language In Java, is a mistake in the rules of the language Is detected by Java compiler. A program that contains a syntax error will not be compiled. Are called compile-time errors

Logical errors: The program can be compiled but, when we attempt to run the program, it doesn’t perform the intended task. To deal with logical statement, you have to debug the program. - print statements - Dr. Java Debugger.

Example of a logical error Which statement is a logic error? a) Omitting the ; from the end of the sentence. b) Using the less than ( ) operator was intended. c) Typing STATIC instead of static for the random function d) Misspelling the name of a variable in the program.