IT 114: Introduction to Java
Class 20

Topics

Review

Homework 7

Homework 7 is not due this Sunday.

Instead it is due the Sunday after the Mid-term Exam.

This will give you time to study for the exam.

You will find the assignment here.

If you have a problem or a question, make a post on the Class Discussion Area.

Mid-term

The mid-term exam will be given on Monday, March 23rd.

It will consist of questions like those on the quizzes along with questions asking you to write short segments of Java code.

60% of the points on this exam will consist of questions from the Ungraded Class Quizzes.

The other 40% will come from four questions that ask you to write a short segment of code.

Today's class will be a review session.

You will only be responsible for the material in the Class Notes for today's class on the exam.

The Mid-term is a closed book exam.

Due Date for Homework Assignments 2 - 6

The due date for homework assignments 2 - 6 is Friday, March 20th at 11:59 PM.

It is also the due date for Class Exercises 2 - 17

That is the Friday of the Spring Break.

Any of these assignments submitted after that date will receive a score of 0.

Today's Class

There will be no Class Quiz or Class Exercise for today's class.

Review

Objects

Classes

Statements

Printing a Line in Java

Data Types

The Java Data Types

Variables

Declaring Variables

Assignment Statements

Literals

= Does Not Mean Equals

Java Is Case Sensitive

Printing Variables

Operators

Arithmetic Operators

The Mod Operator

Two Groups of Data Types

Strings

Concatenation

Concatenating Strings and Numbers

Expressions

Evaluating an Expression

Precedence

Escape Sequences

Control Structures

Loops

Code Blocks

The ++ and -- Operators

Order of Precedence for ++ and --

The for loop

Initializing the Loop Variable

The Loop Test

The Loop Update Statement

The for Loop in Action

for Loop Patterns

Keywords

Mixing Data Types

Integer Division

Defining Methods

Method Headers

Running a Method

Arguments and Parameters

Returning Values

Return Type in Method Header

Method Calls Can Be Expressions

The main Method

Getting Input from the Command Line

Converting Strings to Integers

Conditionals or Branches

The boolean Data Type

Relational Operators

if Statements

if/else Statements

Nested if Statements

if/ else if Statements

Relational Operator Precedence

Casting

Logical Operators

Truth Tables

Precedence of Logical Operators

The While Loop

The do/while Loop

Infinite Loops

Augmented Assignment Operators

Updated Order of Precedence

Storing More Than One Value

Getting Values from an Array

The Length of an Array

Creating an Array Object

Initializing Arrays

Changing Array Elements

What Is an Array Variable?

Objects

Strings

We Have Been Defining Unusual Classes

Two Kinds of Methods

Dot Notation

String Methods

charAt(index)

length()

split(text)

trim()

The Empty String

Strings Cannot Be Changed

Packages

Using Java Packages

Importing Packages

Using a Scanner Objects

Scanner Methods

Attendance