P. 1
02 Slide

02 Slide

Ratings: (0)|Views: 48 |Likes:
Published by MohamedFMN

More info:

Published by: MohamedFMN on Oct 25, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

10/20/2011

pdf

text

original

 
1
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6
Chapter 2 Primitive Data Types andOperations
 
Chapter 1 Introduction to Computers, Programs,and JavaChapter 2 Primitive Data Types and OperationsChapter 4 Loops
 
Chapter 6 Arrays
 
Chapter 5 Methods
 
Basic computer skills such as using Windows,Internet Explorer, and Microsoft Word
 
§§19.1-19.3 in Chapter 19 RecursionChapter 23 Algorithm Efficiency and SortingChapter 3 Selection Statements
 
2
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6
Objectives
3
To write Java programs to perform simple calculations (§2.2).
3
To use identifiers to name variables, constants, methods, and classes (§2.3).
3
To use variables to store data (§2.4-2.5).
3
To program with assignment statements and assignment expressions (§2.5).
3
To use constants to store permanent data (§2.6).
3
To declare Java primitive data types: byte, short, int, long, float, double, and char (§2.7 – 2.10).
3
To use Java operators to write expressions (§2.7 – 2.9).
3
To represent a string using the String type. (§2.10)
3
To obtain input using the JOptionPane input dialog boxes (§2.11).
3
(Optional) To obtain input from console (§2.13).
3
To become familiar with Java documentation, programming style, and namingconventions (§2.14).
3
To distinguish syntax errors, runtime errors, and logic errors (§2.15).
3
To debug logic errors (§2.16).
 
3
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6
Introducing Programming with anExample
Listing 2.1 Computing the Area of aCircleThis program computes the area of thecircle.
 
IMPORTANT NOTE: To run the program from theRun button, (1) set c:\Program Files\java\jdk1.5.0\binfor path, and (2) install slides from the Instructor Resource Website to a directory (e.g., c:\LiangIR) .

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->