For Monday Read pages 53-67 Do exercise 1.1 on page 46 (to hand in – may be done in groups of up to 4) Complete WebCT quiz.

Slides:



Advertisements
Similar presentations
Introduction to Programming
Advertisements

Coding and Debugging. Requirements and Specification Recall the four steps of problem solving: Orient, Plan, Execute, Test Before you start the implementation.
COMS W1004 Introduction to Computer Science May 30, 2008.
2440: 211 Interactive Web Programming JavaScript Fundamentals.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 1 Introducing Java.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Introduction To Computers and Programming Lecture 2: Your first program Professor: Evan Korth New York University.
Slides prepared by Rose Williams, Binghamton University Chapter 9 Exception Handling.
Section 2.4: Errors. Common errors ● Mismatched parentheses ● Omitting space after operator or between numbers ● Putting operator between operands.
Karel The Robot In the beginning… software. Karel the Robot  All robots are controlled by software  Artificially intelligent robots that can “think”
Getting Ready for Java. What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made to understand.
Finding and Debugging Errors
28-Jun-15 Applets. 2 An applet is a program that is typically embedded in a Web page and can be run from a browser You need special HTML in the Web page.
15-Jul-15 Getting Ready for Java. What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made to.
Robot? What’s a Robot? Introducing Karel-the-Robot.
How to turn on the robot How to start Bluetooth How to connect to robot How to initialize the robot How to not break the robot Sec Getting Started.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
Introduction 01_intro.ppt
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
Variables in Java Part 2. ICS-3M1 - Mr. Martens - Variables Part 2 Recall the “int” Data Types When you divide one integer by another – you always get.
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.
CS 0004 –Lecture 1 Wednesday, Jan 5 th, 2011 Roxana Gheorghiu.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Karel J Robot An introduction to BlueJ and Object- Oriented Programming.
1 Classes begin with capital letters (i.e. UrRobot). Methods, objects, and variable names begin with lower case (camelCase) Use indentation to line up.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
111 © 2002, Cisco Systems, Inc. All rights reserved.
IPC144 Introduction to Programming Using C Week 1 – Lesson 2
Program Development Life Cycle (PDLC)
Java Chapter 1 Problem solving: 1. Understanding the problem. 2. Breaking the problem into manageable pieces. 3. Designing a solution. 4. Considering alternatives.
Testing Methods Carl Smith National Certificate Year 2 – Unit 4.
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
Errors “Computer says no..”. Types of Errors Many different types of errors new ones are being invented every day by industrious programming students..
5-Jun-16 Getting Ready for Java. 2 What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made.
Cem Sahin CS  There are two distinguishable kinds of errors: Python's Errors Syntax ErrorsExceptions.
1 CSE1340 Class 4. 2 Objectives Write a simple computer program in Java Use Swing components to build the GUI Use proper naming conventions for classes.
29-Nov-15 Getting Ready for Java. 2 What is Java? Java is a programming language: a language that you can learn to write, and the computer can be made.
School of Computer Science & Information Technology G6DICP - Lecture 6 Errors, bugs and debugging.
ERRORS. Types of errors: Syntax errors Logical errors.
1 Printing in Python Every program needs to do some output This is usually to the screen (shell window) Later we’ll see graphics windows and external files.
Programming Errors. Errors of different types Syntax errors – easiest to fix, found by compiler or interpreter Semantic errors – logic errors, found by.
TCU CoSc Introduction to Programming (with Java) Java Language Overview.
Program Flow LabVIEW Robotics Fundamentals. Unintuition You know what this program does… So what does this one do? Inserted code.
1 Note: Original slides provided by and modified for Mr. Smith’s AP Computer Science A classwww.apComputerScience.com.
Programming in Karel Eric Roberts CS 106A January 6, 2016.
Creating a Java Application and Applet
Error Handling Tonga Institute of Higher Education.
CS12230 Introduction to Programming Lecture 6-2 –Errors and Exceptions 1.
CS116 COMPILER ERRORS George Koutsogiannakis 1. How to work with compiler Errors The Compiler provide error messages to help you debug your code. The.
1- How to connect the robot to the pc Sec Getting Started 3- How to move the robot Sec Scribbler movements 4- How to make a turn 11- How to.
Week 10 - Wednesday.  What did we talk about last time?  Method example  Roulette simulation  Types in Java.
CSE1222: Lecture 1The Ohio State University1. Computing Basics  Computers CPU, Memory & Input/Output (IO)  Program Sequence of instructions for the.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Compiler Errors Syntax error Lexical Can not resolve/find symbol Can not be applied Execution error Oh wait, a run time error Intent error It ran, but.
Programming Basics - RobotC Introduction to Robotics.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Error Analysis Logic Errors.
5.01 Understand Different Types of Programming Errors
In the beginning… software
Copyright © 2008 by Helene G. Kershner
Testing and Debugging.
Copyright © 2008 by Helene G. Kershner
Karel J Robot.
Java Programming: Guided Learning with Early Objects
5.01 Understand Different Types of Programming Errors
Programming Basics - RobotC
Java Programming Control Structures Part 1
Graphical User Interfaces in Java Event-driven programming
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Presentation transcript:

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

Documentation What is documentation?

Sources of Documentation java.sun.com

Programming Process

Errors Compile-time errors –Also known as syntax errors Run-time errors Intent errors –Also known as logic errors

Compile-time Errors Program breaks some rules of Java Examples –Leaving out parentheses, semi-colons, braces –Misspelling words –Capitalization wrong (Java is case-sensitive) Discovered because the compiler points them out

Run-time Errors Program compiles correctly and starts to run by reaches an error state and stops Examples: –Robot run into a wall –Robot tries to put a thing down when it doesn’t have one –Robot tries to pick something up, but there’s nothing there

Intent Errors Programs run fine, but doesn’t actually work What if we forgot to make karel turn left in the relay race program? These are not too hard to recognize and fix in the robot world, but can be quite challenging in other kinds of programs.

Software Patterns Intended to help you learn and generalize. Not to be skipped over and ignored.

Basic Java Patterns Java Program Pattern Object Instantiation Pattern Command Invocation Pattern Sequential Execution Pattern

Planting Flowers You have a square enclosure. You want to have a robot plant flowers (Things) around the enclosure. See below. Questions: How many walls are there? How are they positioned? Where do the flowers come from?

Beyond Robots Objects are used in all contexts in Java programs. The same patterns are used to develop GUI (Graphical user interface) programs as to develop Robot programs. However, the classes we use are different.

Sample Simple GUI Use the JFrame, JLabel, JTextField, and JTextArea classes to produce a program that creates a window that looks like a browser window (sort of).