Course Lectures, Readings & Resources

Final Exam: Monday, 12/17: 10:00-11:50 AM, Room: 109 (bring your NYUID card to the exam. )

Sample for final exam : Sample Final solutions: 1.1 - 1.4 - 1.5 - 2 - 3- 4 - 5 - 6 - 7

Helpful resources online tutorials and Java resources

Free PowerPoint viewer for class notes

Class

Date

Topic & Class Programs

Class Lectures

1 9/5 Course Introduction

Reading: Chapter 1
Course Introduction

2 9/10

Java Introduction
First programs: Welcome1, Welcome2 & Welcome3


Lecture 1
3 9/12

  Lab Session: Class will be held at the ITS Lab at 14 Washington Place. We will meet in class first, then will go to the lab together. Make sure you are on time!



Lab assignment (assignment # 0, due 9/12 by midnight)


4 9/17

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

Reading: Chapter 2
Variables
5 9/19

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



 
6 9/24   Arithmetic Operators: division, division2, average, the area of a circle
Using the"Mod" operator %: DivMod.txt, date , ReverseDigits.txt
  Mathematical operators & casting
7 9/26

Using boolean variables : BoolTest.txt

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

Reading: Chapter 3
Boolean types; If & else statemnts
8 10/1

Using boolean variables

More if statements: 

Conditions, logical operators, and switch statement
9 10/3

Using boolean variables: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
  10/8

No class (Holiday)

 

10 10/10

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

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

Readings: Chap. 4

Char Lecture


For loops

11 10/15

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

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

 

 

 

  While loops

 

 

12 10/17

More While Loops with letters: while loop to count # of vowels, while to count # of commas and spaces

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

Using Sentinel value to control loops: Average , MaxNumber

 

  Sentinels loops

 

13 10/22   Midterm #1 Review  
14 10/24 Midterm # 1 Exam (20% of course grade)  
15 10/29

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
16 10/31

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

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

 

Nested loops

 

 

17 11/5

Nested loops using
multipication table1, Nested loops using multipication table2

Method examples:
Square
, sqrt , NoParameters, ReturnVoid,

 

18 11/7

More work with Methods:
GreenEggsAndHam
, Squares, max method with two parameters

 

 



Readings: Chap. 5
Methods in Java

 

 

 

19 11/12

Methods: Generating Random numbers:

Example of Math class Methods , Raise_to_Power

Example of Math class Methods

More exampe 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
20 11/14

Review Methods Midterm # 2 Review

 



 
21 11/19

Midterm # 2 Exam (20% of course grade)

 
22 11/21   Arrays:  
23 11/26

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
24 11/28  Methods with arrays: PassArray , TestPassArray , Deviation , Copy array (refrence) , Copy array elements using a loop , Copy array elements using System.copyarray method  
25 12/3 Arrays review  
26 12/5

Applets (not on final): applets examples & instructions


Appletslecture
27 12/10

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

 
28 12/12   LAST day of classes:
Review for final
 

Supplemental Course Materials

Using and Installing software used in class

Using and installing the IDE (NetBeans - BlueJ Edition)

You are free to use an IDE of your choice. Here are a few options:

Stand alone JDK and Netbeans

JCreator

Eclipse

Click here for further information on other IDEs

Click here for information on the Java Classes Library