Course Lectures, Readings & Resources

Announcement:

Preparation for Midterm #1 review material

Helpful resources:

Here is a tentative schedule

Class

Date

Topic & Class Programs

Class Lectures

1   Course Introduction

Reading: Chapter 1
Course Introduction

2  

Java Introduction
First programs: Welcome1, Welcome2 & Welcome3

 


Introduction to Java Lecture
3  

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

 

Arithmetic Operators: division, division2, average, the area of a circle


Reading: Chapter 2

Variables

4  

Data entry from the keyboard using JOptionpane class:Welcome3 and Welcome4, text, integers,



  Mathematical operators Part 1

Mathematical operators part II

5  

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

Using the"Mod" operator % to separate digits:

6  

Using boolean data type: BoolTest.txt

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

MORE EXAMPLES OF nested if statements and combining conditions : Bouncer1, Bouncer2, Bouncer3, Bouncer4, Bouncer5.txt, Bouncer6.txt, Bouncer7.txt, Bouncer8.txt,
grades_example1
, grades_example2

 



Reading: Chapter 3
Boolean types; If & else statements

7  

UsingLogical operators "&&" , "||" and "^" : TruthTables
Using shortcut operators
( 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

Using Char: directions_using_if, directions_using_switch

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


Conditions, logical operators, and switch statement
8  

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

Shortcut operators: pre_post increment , Shortcut_operators

Formatting numbers for output

 

 

Readings: Chap. 4


9  

Char data type :char_entry, Char.txt, CharInput.txt,

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

 

Readings: Chap. 4

Char Lecture

10  

Repetition Structure: For loops

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

Using Counter controlled loops (for loops ): Alphabet.txt, String example,Sqaure numbers_ loop

** useful for homework ** For Loops with letters/string:
Converting Caps to small letters example
loop to count # of vowels
loop to count # of commas and spaces

 

 

 

For loops  

 

 

11  

While and for loops using numbers: while loops with numbers ,for loops with numbers , Sqaure numbers_ loop , product_loop

Using Sentinel value to control loops: Average , MaxNumber

 

 

 

 

 

  While loops

Sentinels loops

 

 

12  

Midterm #1 Review

 

 

 

 

 

3/12/09

Midterm # 1 Exam (20% of course grade)

Do while loops and nested loops are not included on the exam
14  

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

 
15  

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

 

 

 

Nested loops

Readings: Chap. 4

 

16  

Review all of these examples for assignment #4:

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

2) More Nested loops examples:
multipication table1, Nested loops using multipication table2

3) Use nested loops to draw rugs pattern: pretty rug example 1, puzzle


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

 

 

 

 

   
17  

More Nested Loops examples

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

 

 

18  

Methods

Square, sqrt

 

 

 


Readings: Chap. 5

Methods in Java

19  

Methods: Generating Random numbers:

Example of Math class Methods , Raise_to_Power

Example of Math class Methods

 

 

 

 




Generating random numbers lecture: Random

 

 

 

20  

Methods review: NoParameters, ReturnVoid, Square, sqrt. max method with two parameters

 

More example on generating random numbers with methods:


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)




 

 

 

21  

Review Methods:Random numbers & user defined methods

SnakeEyes ,SnakeEyes using methods

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

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

BoxMethod (helpful for assignment # 5)

 

 


 

22  

Overloading methods:
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
23  

Midterm # 2 Review



 
24  

Midterm # 2 Exam (20% of course grade)



25  

Arrays: Sculptures by Louise Nevelson at the Guggenheim Museum

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
26    Methods with arrays: PassArray , TestPassArray , Deviation , Copy array (refrence) , Copy array elements using a loop , Copy array elements using System.copyarray method  
   

 

 


       

.