Exposure Java 2014 Table of Contents Chapters I x



Download 69.44 Kb.
Date20.10.2016
Size69.44 Kb.
#6783
Exposure Java 2014 Table of Contents

Chapters I - X

I Introduction to Computer Science

1.1


1.2

1.3


1.4

1.5


1.6

1.7


1.8

1.9


1.10

1.11


1.12

1.13


Learning the Exposure Way . . . . . . . . . . . .

Exposure Equation . . . . . . . . . . . . . . .

Getting Started . . . . . . . . . . . . . . . . .

How Do Computers Work? . . . . . . . . . . . .

Messages with Morse Code . . . . . . . . . . . .

Electronic Memory . . . . . . . . . . . . . . .

Memory and Storage . . . . . . . . . . . . . . .

Hardware and Software . . . . . . . . . . . . . .

A “Brief” History of Computers. . . . . . . . . . . .

What Is Programming? . . . . . . . . . . . . . .

A “Brief” History of Programming Languages . . . . . .

Networking . . . . . . . . . . . . . . . . . .

Summary . . . . . . . . . . . . . . . . . . .



2

4



7

8

9



11

15

18



20

41

42



49

52

IIa Introduction to NXT

2a.1

2a.2


2a.3

2a.4


2a.5

2a.6


Introduction . . . . . . . . . . . . . . . . . .

Loading and Executing an NXT Program . . . . . . . .

The Sequence Beam and Program Blocks . . . . . . .

Configuring the Display and Wait Blocks . . . . . . . .

Configuring the Move Block . . . . . . . . . . . .

Program Comments . . . . . . . . . . . . . . .

54

58



63

68

72



79

IIb Introduction to Java

2b.1


2b.2

2b.3


2b.4

2b.5


2b.6

2b.7


2b.8

2b.9


2b.10

2b.11

Introduction . . . . . . . . . . . . . . . . . .

Getting Started with Java . . . . . . . . . . . . .

A Visit to the United Nations . . . . . . . . . . . .

Java Bytecode . . . . . . . . . . . . . . . . .

Applications and Applets . . . . . . . . . . . . .

Using Java Software . . . . . . . . . . . . . .

Text Output With print & println . . . . . . . . . . .

Program Compile Errors . . . . . . . . . . . . . .

Program Comments . . . . . . . . . . . . . . .

The Responsible Use of Computers . . . . . . . . .

NXT and Java Comparison . . . . . . . . . . . .

82

83



83

85

88



89

91

97



100

104


111




IIIa Variables and Constants

3a.1


3a.2

3a.3


3a.4

3a.5


3a.6

Introduction . . . . . . . . . . . . . . . . . .

The NXT Variable Block . . . . . . . . . . . . . .

Using Data Wires to transfer Data Values . . . . . . .

Binary Operations with the Math Block . . . . . . . .

String Concatenation with the Text Block . . . . . . .

The NXT Constant Block . . . . . . . . . . . . .

126


127

131


136

140


144

IIIb Java Simple Data Types

3b.1


3b.2

3b.3


3b.4

3b.5


3b.6

3b.7


3b.8

3b.9


3b.10

3b.11


3b.12

Introduction . . . . . . . . . . . . . . . . . .

Storing Data Information . . . . . . . . . . . . .

Declaring Variables in Java . . . . . . . . . . . .

The int Data Type . . . . . . . . . . . . . . . .

The double Data Type . . . . . . . . . . . . . .

The String Data Type . . . . . . . . . . . . . . .

The char Data Type . . . . . . . . . . . . . . .

The boolean Data Type . . . . . . . . . . . . . .

Declaring Constants in Java. . . . . . . . . . . . .

Documenting Your Programs . . . . . . . . . . . .

Mathematical Precedence . . . . . . . . . . . . .

NXT and Java Comparison . . . . . . . . . . . .

150


151

152


155

159


161

163


164

165


166

170


173

IVa Blocks and Data Hubs

4a.1


4a.2

4a.3


4a.4

4a.5


4a.6

Introduction . . . . . . . . . . . . . . . . . .

Using Math Block Functions . . . . . . . . . . . .

The Random Block . . . . . . . . . . . . . . .

Graphics and Coordinate Geometry . . . . . . . . .

The Display Block Revisited . . . . . . . . . . . .

The Sound Block . . . . . . . . . . . . . . . .

184


186

191


196

197


201

IVb Java Program Organization

4b.1


4b.2

4b.3


4b.4

4b.5


4b.6

4b.7


4b.8

4b.9


4b.10

4b.11


Introduction . . . . . . . . . . . . . . . . . .

Java Program Components . . . . . . . . . . . .

Using the Math Class . . . . . . . . . . . . . .

Introduction to the Expo Class . . . . . . . . . . .

Graphics and Coordinate Geometry . . . . . . . . .

Drawing Methods . . . . . . . . . . . . . . . .

Fill Methods and Graphics Colors . . . . . . . . . .

The random Method . . . . . . . . . . . . . . .

Drawing Polygons . . . . . . . . . . . . . . . .

Expo Class Reference Information . . . . . . . . . .

NXT and Java Comparison . . . . . . . . . . . .



204


205

208


216

217


223

230


234

237


242

244


Va Repetition with the Loop Block

5a.1


5a.2

5a.3


5a.4

5a.5


5a.6

5a.7


5a.8

5a.9


Introduction . . . . . . . . . . . . . . . . . .

Fixed Repetition with the Loop Block . . . . . . . . .

Using the Loop Control Variable . . . . . . . . . . .

Using the Loop Block with Wait . . . . . . . . . . .

Nested Looping . . . . . . . . . . . . . . . . .

Nested Loops and Data Wires . . . . . . . . . . .

Using Sound in a Loop Block . . . . . . . . . . . .

Conditional Looping . . . . . . . . . . . . . . .

Using the Loop Block with Graphics . . . . . . . . .


252


253

256


258

259


262

264


266

269


Vb Java Repetition

5b.1


5b.2

5b.3


5b.4

5b.5


5b.6

5b.7


5b.8

5b.9


5b.10

5b.11


5b.12

Introduction . . . . . . . . . . . . . . . . . .

Fixed Repetition with for. . . . . . . . . . . . . .

Using the Loop Control Variable . . . . . . . . . . .

Nested Loops . . . . . . . . . . . . . . . . .

Keyboard Input with Expo.enterInt . . . . . . . . . .

Conditional Repetition with do…while . . . . . . . . .

Repetition and Graphics. . . . . . . . . . . . . .

Displaying Graphics Characters . . . . . . . . . . .

Drawing Regular Polygons . . . . . . . . . . . . .

Creating New Colors . . . . . . . . . . . . . . .

Using Random Numbers with graphics in a Loop . . . . . NXT and Java Comparison . . . . . . . . . . . .




272


274

278


281

286


287

291


297

301


305

308


315

VIa Class Methods and Object Methods

6a.1


6a.2

6a.3


6a.4

6a.5


6a.6

6a.7


6a.8

6a.9


Introduction . . . . . . . . . . . . . . . . . .

Creating Simple Program Blocks . . . . . . . . . .

Program Blocks with Input Information . . . . . . . .

Program Blocks with Multiple Input Information . . . . .

Program Blocks with Output Information . . . . . . . .

Program Blocks with Input & Output Information . . . . .

Using My Blocks to Create a My Block . . . . . . . .

User Input with the EnterIntNXT My Block . . . . . . .

Creating a Practical Program with Just a Few My Blocks . .



326


328

339


344

351


355

359


372

376



VIb Class Methods and Object Methods

6b.1


6b.2

6b.3


6b.4

6b.5


6b.6

6b.7


6b.8

6b.9


6b.10

Introduction . . . . . . . . . . . . . . . . . .

Creating Simple Methods . . . . . . . . . . . . .

Graphics Programs with Multiple Methods . . . . . . .

Creating a Big Graphics Program Step-By-Step . . . . .

Void Methods with a Single Parameter . . . . . . . .

Void Methods with Multiple Parameters . . . . . . . .

Return Methods with a Single Parameter . . . . . . .

Return Methods with Multiple Parameters . . . . . . .

Creating Methods with Other Methods . . . . . . . .

NXT and Java Comparison . . . . . . . . . . . .

382


383

392


409

417


422

430


432

436


443


VIIa Decision Making in NXT

7a.1


7a.2

7a.3


7a.4

7a.5


7a.6

7a.7


7a.8

7a.9


Introduction . . . . . . . . . . . . . . . . . .

Switch Block Settings . . . . . . . . . . . . . . .

One-Way Selection . . . . . . . . . . . . . . .

Two-Way Selection . . . . . . . . . . . . . . .

Nested Control Structures . . . . . . . . . . . . .

Multi-Way Selection . . . . . . . . . . . . . . .

Compound Conditions . . . . . . . . . . . . . .

Ranges . . . . . . . . . . . . . . . . . . . .

Compound Compound Conditions . . . . . . . . . .



454


459

461


463

465


468

471


476

479

VIIb Decision Making in Java

7b.1

7b.2


7b.3

7b.4


7b.5

7b.6


7b.7

7b.8


7b.9

7b.10


7b.11

Introduction . . . . . . . . . . . . . . . . . .

Relational Operators . . . . . . . . . . . . . . .

One-Way Selection . . . . . . . . . . . . . . .

Two-Way Selection . . . . . . . . . . . . . . .

Nested Control Structures . . . . . . . . . . . . .

Multiple-Way Selection . . . . . . . . . . . . . .

The boolean Data Type . . . . . . . . . . . . . .

Compound Conditions . . . . . . . . . . . . . .

Ranges . . . . . . . . . . . . . . . . . . . .

Protecting Against user Data Entry Errors . . . . . . .

NXT and Java Comparison . . . . . . . . . . . .



484


484

487


492

495


504

518


521

530


534

536


VIII Using Sensors in NXT

8.1


8.2

8.3


8.4

8.5


8.6

8.7


8.8

8.9


Introduction . . . . . . . . . . . . . . . . . .

Sensor Blocks in Lego NXT . . . . . . . . . . . .

The Touch Sensor . . . . . . . . . . . . . . . .

The Sound Sensor . . . . . . . . . . . . . . . .

The Light Sensor . . . . . . . . . . . . . . . .

The Ultrasonic Sensor . . . . . . . . . . . . . .

The NXT Button Sensor . . . . . . . . . . . . . .

The Rotation Sensor . . . . . . . . . . . . . . .

Combining Sensors . . . . . . . . . . . . . . .


550


554

556


563

566


568

574


578

583


IXa File Handling in NXT

9a.1


9a.2

9a.3


9a.4

9a.5


9a.6

9a.7


Introduction . . . . . . . . . . . . . . . . . .

Different Types of Files . . . . . . . . . . . . . .

The File Access Block . . . . . . . . . . . . . .

Storing and Retrieving Text Data . . . . . . . . . .

Files with Multiple Lines of Data . . . . . . . . . . .

Retrieving Data with a Conditional Loop . . . . . . . .

Data Files that Store Numbers . . . . . . . . . . .



588


590

591


596

597


599

600

IXb Object Methods and Text Files

9b.1

9b.2


9b.3

9b.4


9b.5

9b.6


9b.7

9b.8


Introduction . . . . . . . . . . . . . . . . . .

Classes and Objects . . . . . . . . . . . . . . .

Using Object Methods . . . . . . . . . . . . . .

Using the DecimalFormat Class . . . . . . . . . . .

Reading In Text Files . . . . . . . . . . . . . . .

Writing Out Text Files . . . . . . . . . . . . . .

Reading and Writing Simultaneously . . . . . . . . .

Summary . . . . . . . . . . . . . . . . . . .

604


605

610


616

619


628

631


633

X Intermediate Graphics

10.1


10.2

10.3


10.4

10.5


10.6

10.7


10.8

10.9


10.10

Introduction . . . . . . . . . . . . . . . . . .

Using Mouse Events . . . . . . . . . . . . . . .

Importing Images . . . . . . . . . . . . . . . .

Fixing Image Issues . . . . . . . . . . . . . . .

New Features with the Deluxe Expo Class . . . . . . .

Multi-Page Output . . . . . . . . . . . . . . . .

Creating a Simple Draw Program . . . . . . . . . .

Creating Clickable Areas in the Applet . . . . . . . .

Computer Animation . . . . . . . . . . . . . . .

The Last Word . . . . . . . . . . . . . . . . .

636


636

644


650

670


680

683


700

712


726



Table of Contents Chapters 1-10

Download 69.44 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page