Back
Close

Intro to Programming Examples

Anonymous
61.2K views

1.1 Programs, Fields

First Example
Second Example

1.2 Java as a Calculator

Operators
Operators
Not Quite Math
Not Quite Math
Negative Results

1.3 Syntax

Syntax
Syntax
Syntax

2.1 Using Fields

Using Fields
Using Fields
Getting Paid
Calculating Revenue

2.2 Beyond ints

String Examples
Conctenating Strings
Conctenating Strings
Video Game Example Initial Attempt
Video Game Example Second Attempt
Number Precision
Rectangle

2.3 Java Checks Types

Mixing Strings and ints
Mixing Strings and ints
Mixing Strings and ints

3.1 Capturing Repeated Work with Methods

Using Methods
Using Methods
Using Methods

3.2 Methods as Descriptions of Tasks

Implementing Tasks
Following the Design Recipe
Following the Design Recipe

3.3 With Great Power Comes More Opportunity for Mistakes

Understanding Errors
Understanding Errors
Understanding Errors
Understanding Errors

4.1 Beyond Arithmetic and Concatenation

Using Conditions
Using Conditions
Using Conditions
Using Conditions

4.2 More Examples of Decision-Making Programs

Using Conditions
Using Conditions
Using Conditions

5.1 Representing Compound Data

Combining Data into Classes

5.2 More on Methods

Creating Instances of Classes

5.3 Variables and Scope

Total Cost Calculation
Variable fill-in
Bad Scope
Bad Scope Experimentation

6.2 From Examples to Testing

Reviewing the Code