Catie Welsh January 31, 2011 1.  Project 1 Due Wednesday  Lab 1 Grades are posted 2.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

1.A computer game is an example of A.system software; B.a compiler; C.application software; D.hardware; E.none of the above. 2.JVM stands for: A.Java Virtual.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
© A+ Computer Science - public class CompSci { } All Java programs start with a class.
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.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. GCOC – A.P. Computer Science A College Board Computer Science A Topics Covered Program Design - Read and understand.
© A+ Computer Science - public class CompSci { } All Java programs start with a class.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Primitive Data Types byte, short, int, long float, double char boolean Are all primitive data types. Primitive data types always start with a small letter.
CS211 Data Structures Sami Rollins Fall 2004.
COMP 110 Primitive Types, Strings, and Console I/O Tabitha Peck M.S. January 23, 2008 MWF 3-3:50 pm Philips
COMP 110 Errors, Strings, and Review Tabitha Peck M.S. January 28, 2008 MWF 3-3:50 pm Philips
CS 101 Problem Solving and Structured Programming in C Sami Rollins Spring 2003.
Writing Methods. Create the method Methods, like functions, do something They contain the code that performs the job Methods have two parts.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
IB Computer Science II Paul Bui
2.2 Information on Program Appearance and Printing.
COMP 110 Computer Basics Luv Kohli August 25, 2008 MWF 2-2:50 pm Sitterson
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
Catie Welsh January 12, 2011 MWF 1-1:50 pm Sitterson
Catie Welsh January 19,  Office Hours ◦ After Class Today ◦ Come if you don’t have Eclipse working 2.
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
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.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Java Byte Code l The Java compiler generates Java Byte Code. (Most.
Object Oriented Programming Computer Engineering Department JAVA Programming Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2014.
JAVA BASICS: Variables and References SYNTAX, ERRORS, AND DEBUGGING.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Programming Concept Chapter I Introduction to Java Programming.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
3 Major Steps for Creating/Running a Java Program You write the source code for the program and save it as a.java file. You compile the.java program using.
COMP Mid-Term Review Yi Hong May 27, 2015.
COMP String and Console I/O Yi Hong May 18, 2015.
Chapter 1 Section 1.1 Introduction to Java Slides prepared by Rose Williams, Binghamton University Kenrick Mock, University of Alaska Anchorage.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
1 Operators and Expressions Instructor: Mainak Chaudhuri
Computer programming Lecture#2 أ. إلهام باسندوه 1.
© 2004 Pearson Addison-Wesley. All rights reserved ComS 207: Programming I Instructor: Alexander Stoytchev
JAVA Practical Creating our first program 2. Source code file 3. Class file 4. Understanding the different parts of our program 5. Escape characters.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
ECE 122 Feb. 1, Introduction to Eclipse Java Statements Declaration Assignment Method calls.
1 12/4/1435 h Lecture 2 Programs and Programming Languages.
Catie Welsh February 2,  Program 1 Due Today by 11:59pm today  Program 2 Assigned Today  Lab 2 Due Friday by 1:00pm 2.
ERRORS. Types of errors: Syntax errors Logical errors.
Catie Welsh February 23,  Lab 4 due on Friday  Lab 5 will be assigned on Friday 2.
Java FilesOops - Mistake Java lingoSyntax
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
COMP 110: Spring Announcements Lab 1 due Wednesday at Noon Assignment 1 available on website Online drop date is today.
Introduction to C++.  Computers: CPU, Memory & Input / Output (IO)  Program: Sequence of instructions for the computer.  Operating system: Program.
© A+ Computer Science - public class CompSci { } All Java programs start with a class.
CSE1222: Lecture 1The Ohio State University1. Computing Basics  Computers CPU, Memory & Input/Output (IO)  Program Sequence of instructions for the.
Catie Welsh February 14,  Program 2 Due Tonight by 11:59pm  Program 3 Assigned 2.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Elementary Programming.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Catie Welsh March 4,  Midterm on Monday, March 14th ◦ Closed books, no notes, no computer  No office hours during Spring Break ◦ However, I will.
Programming in Java Transitioning from Alice. Becomes not myFirstMethod but …. public static void main (String[] arg) { // code for testing classes goes.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
COMP Review of Chapter 1 & 2
GC101 Introduction to computer and program
Elementary Programming
Writing Methods.
Java Intro.
Focus of the Course Object-Oriented Software Development
IB Computer Science II Paul Bui
 Is a machine that is able to take information (input), do some work on (process), and to make new information (output) COMPUTER.
Instructor: Alexander Stoytchev
How to Run a Java Program
Presentation transcript:

Catie Welsh January 31,

 Project 1 Due Wednesday  Lab 1 Grades are posted 2

3

4  Errors  Strings  Review

 Syntax error - grammatical mistake in your program  Run-time error - error that is detected when your program is run  Logic error - the output of your program is incorrect

UNCisGreat String output = myString.substring(1, 8); 6

 System.out.println(“How do I put \“quotes\” in my string?”); \”Double quote \’Single quote \\Backslash \nNew line \rCarriage return \tTab 7

 System.out.print(“this is a string”);  System.out.println(“this is a string”);  What is the difference? 8

 See p. 90

 Meaningful names  Indenting  Documentation  Defined Constants 10

 public static final Type Variable = Constant;  Named in ALL_CAPS  public class DefinedConstant { public static final double PI = ; public static void main(String[] args) { 11

 Hardware - physical machine ◦ CPU, Memory  Software - programs that give instructions to the computer ◦ Windows XP, Games, Eclipse 12

 Object-Oriented Programming Language ◦ Objects and methods

 “Information hiding”  Putting things in a capsule  Methods in the String class ◦ myString.length();

 “many forms”  Same instruction to mean same thing in different contexts. ◦ Example: “Go play your favorite sport.”  I’d go play lacrosse.  Others of you would play baseball instead.  In programming, this means that the same method name can cause different actions depending on what object it is applied to. 15

 Organizing classes so properties only have to be defined once

 Read 3.1  Project 1 Due  Project 2 Assigned 17