DOC PREVIEW
Introduction to Computing and Programming in Java: A Multimedia Approach

This preview shows page 1-2-3-4-5-6-7-8-9-10-69-70-71-72-73-74-75-76-77-78-140-141-142-143-144-145-146-147-148-149 out of 149 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 149 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

“main”2005/1/11page iiiiiiiiiBETA Version, January 10th,2005:Introduction to Computing andProgramming in Java:A Multimedia ApproachMark Guzdial and Barbara EricsonCollege of Computing/GVUGeorgia Institute of TechnologyPRENTICE HALL, Upper Saddle River, New Jersey 07458“main”2005/1/11page iiiiiiiiiiiiCopyright held by Mark Guzdial and Barbara Ericson, 2005.“main”2005/1/11page iiiiiiiiiiiiiiDedicated to our children Matthew, Katherine, and Jennifer“main”2005/1/11page iviiiiiiiiContentsContents ivPreface 1I Introduction 71 Introduction to Computer Science and Media Computation 81.1 What is Computer Science About? . . . . . . . . . . . . . . . . . . . 81.2 What Computers Understand . . . . . . . . . . . . . . . . . . . . . . 131.3 Media Computation: Why Digitize Media? . . . . . . . . . . . . . . 151.4 Computer Science for Everyone . . . . . . . . . . . . . . . . . . . . . 161.4.1 It’s About Communication . . . . . . . . . . . . . . . . . . . 171.4.2 It’s About Process . . . . . . . . . . . . . . . . . . . . . . . . 172 Introduction to Java 192.1 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1.1 History of Java . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1.2 Introduction to Objects and Classes . . . . . . . . . . . . . . 202.2 Introduction to DrJava . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2.1 Starting DrJava . . . . . . . . . . . . . . . . . . . . . . . . . 212.3 Java Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.3.1 Math Operators . . . . . . . . . . . . . . . . . . . . . . . . . 242.3.2 Printing the Result of a Statement . . . . . . . . . . . . . . . 242.3.3 Types in Math Expressions . . . . . . . . . . . . . . . . . . . 272.3.4 Casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272.3.5 Relational Operators . . . . . . . . . . . . . . . . . . . . . . . 272.3.6 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292.4 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.4.1 Declaring Variables . . . . . . . . . . . . . . . . . . . . . . . . 312.4.2 Using Variables in Calculations . . . . . . . . . . . . . . . . . 312.4.3 Memory Maps of Variables . . . . . . . . . . . . . . . . . . . 322.4.4 Object Variables . . . . . . . . . . . . . . . . . . . . . . . . . 342.4.5 Reusing Variables . . . . . . . . . . . . . . . . . . . . . . . . 362.4.6 Multiple References to an Object . . . . . . . . . . . . . . . . 372.5 Concepts Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.5.1 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.5.2 Relational Operators . . . . . . . . . . . . . . . . . . . . . . . 402.5.3 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.5.4 Casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.5.5 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41iv“main”2005/1/11page viiiiiiiiv3 Introduction to Programming 433.1 Programming is About Naming . . . . . . . . . . . . . . . . . . . . . 433.2 Files and their Names . . . . . . . . . . . . . . . . . . . . . . . . . . 453.3 Class and Object Methods . . . . . . . . . . . . . . . . . . . . . . . . 463.3.1 Invoking Class Methods . . . . . . . . . . . . . . . . . . . . . 463.3.2 Invoking Object Methods . . . . . . . . . . . . . . . . . . . . 473.4 Working with Turtles . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.4.1 Defining Classes . . . . . . . . . . . . . . . . . . . . . . . . . 483.4.2 Creating Objects . . . . . . . . . . . . . . . . . . . . . . . . . 483.4.3 Sending Messages to Objects . . . . . . . . . . . . . . . . . . 513.4.4 Objects Control Their State . . . . . . . . . . . . . . . . . . . 523.4.5 Additional Turtle …


Introduction to Computing and Programming in Java: A Multimedia Approach

Download Introduction to Computing and Programming in Java: A Multimedia Approach
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to Computing and Programming in Java: A Multimedia Approach and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to Computing and Programming in Java: A Multimedia Approach 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?