Course Lectures, Readings & Resources

Class

Date

Topic & Class Programs

Class Lectures

1 5/19 Course Introduction

Reading: Chapter 1
Course Introduction

2 5/20

Java Introduction
First programs: Welcome1, Welcome2 & Welcome3

 


Introduction to Java Lecture
3 5/21

 Using "Variables": int, double, char & float: addition

 



Reading: Chapter 2Variables


4 5/22 Data entry from the keyboard using JOptionpane class:Welcome3 and Welcome4, text, integers, Assignment#0 (assignment # 0, due 5/22 by midnight)
5 5/28

average, the area of a circle

Using the"Mod" operator % to separate digits: DivMod.txt,ReverseDigits.txt, date

Control Structure (comparisons):
Selection statements: if/else statements:
Even & odd numbers, comparing numbers



Mathematical operators

6 5/29

 

if statements: Even & odd numbers, comparing numbers , Bouncer1, Bouncer2, Bouncer3, Bouncer4, Bouncer5.txt, Bouncer6.txt, Bouncer7.txt, Bouncer8.txt,
grades_example1
, grades_example2

 



Reading: Chapter 3
Boolean types; If & else statemnts
7 5/30

Using boolean variables:BoolTest.txt, TruthTables
Conditional.txt

Review if statements: dice_using_if

Switch selection: dice_using_switch ,switch example 2 ,

Data entry from the keyboard using JOptionpane class with char and String datatypes:text

Conditions, logical operators, and switch statement
8 6/2

Data entry from the keyboard using JOptionpane class with char and String datatypes:text

Using Char: char_entry, Char.txt, CharInput.txt, directions_using_if, directions_using_switch

Using length() to get the number of characters in the string: char using length

Shortcut operators: pre_post increment , Shortcut_operators

Formatting numbers for output

For loops: For1.txt, For2.txt, For3.txt

Readings: Chap. 4

Char Lecture

See Char table chart

For loops

11 6/3

Using Counter controlled loops: String example, Sqaure numbers_ loop,

Using Sentinel value to control loops: Average , MaxNumber

While and for loops using numbers:

while loops with numbers
,for loops with numbers , Sqaure numbers_ loop , product_loop

 

Sentinels loops  

While loops  

 

12 6/4

Review While loops using numbers:

while loops with numbers

Manipulating String and Char using loops:

For loops examples (char): For loop using char , For loop using char example 2 , Alphabet.txt

 

 

 

 

 

13 6/5 Midterm Exam  
14 6/9

More loop examples, do while loops

Do while example: DoWhileTest.txt, do-while example #2.

Using break and continue in loops: Using break and continue in a loop

Casting IntLong.txt, Casting.txt, InaccurateDouble.txt 
See (Mathematical operators lecture) for more information on casting

String comparisons:
http://www.leepoint.net/notesjava/data/strings/12stringcomparison.html

 

  Do while
   
15 6/10

Nested Loops examples: Nested loop using seconds and minutes, sec. min. and hours and days in one week ,

Producing 2 D shapes using nested loops:
Square_example, Rectangle
Triangles: right triangle1, triangle2, triangle3

 

 

Nested loops

 

 

16 6/11

More nested loops:

Rug Art Example: viewing regular patterns in kilims from Iran and Bulgaria from Kilims: A Buyer's Guide by Lee Allane

More nested loops examples using rugs pattern: pretty rug example 1, puzzle#1, puzzle#2

 

 
17 6/16

Methods


Readings: Chap. 5

Methods in Java

18 6/17

More work with Methods:
Square, sqrt

Squares, max method with two parameters

 

 




 

 

 

   

Methods: Generating Random numbers:

NoParameters, ReturnVoid

Example of Math class Methods , Raise_to_Power

Example of Math class Methods

More example on generating random numbers with methods:

Generating Random numbers:


Generating random numbers and a range of random numbers
Generating random characters  and randomly rolling a die

 

example on generating random numbers with methods: random word(5 small letters)

Random method to generate different ranges of random numbers, Random method (interactive and effecient), random word(5 small letters)

 

Generating random numbers lecture: Random
   

Review Methods:Random numbers & user defined methods

Random method (interactive and effecient),SnakeEyes ,SnakeEyes using methods

Converting temperatures , Example of Math class Methods,Statistics, Boolean , Raise_to_Power, BoxMethods,

Concepts: Scope (example 1) of local variables in Methods (pass by value)
Concepts: Scope (example 2) of local variables in Methods (pass by value)

Examples of MAX methods with NO Overloading: max method with two parameters , max with three parameters

Examples of Overloading Methods(three methods with the same name in one class (program) with differnet number of paramters and different data types): three max methods in the same class

Overloading methods lecture: Overloading

 

   

Arrays: arrays example 1, arrays example 2 , arrays example 3 ,arrays example 4 , arrays example 5 , arrays example 6, arrays example 7, arrays example 8 , arrays example 9 , arrays example 10

Chap. 6
Arrays lecture

     Methods with arrays: PassArray , TestPassArray , Deviation , Copy array (refrence) , Copy array elements using a loop , Copy array elements using System.copyarray method  
   

Applets (not on final): applets examples & instructions


Appletslecture
   

Review for final : Copy array elements using System.copyarray method

 
    Final during class 6/26 room 102 in WWH