Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Catie Welsh January 31, 2011 1.  Project 1 Due Wednesday  Lab 1 Grades are posted 2."— Presentation transcript:

1 Catie Welsh January 31, 2011 1

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

3 3

4 4  Errors  Strings  Review

5  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

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

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

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

9  See p. 90

10  Meaningful names  Indenting  Documentation  Defined Constants 10

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

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

13  Object-Oriented Programming Language ◦ Objects and methods

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

15  “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

16  Organizing classes so properties only have to be defined once

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


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

Similar presentations


Ads by Google