Home

 About  

     

Java

Notes

 

 

June 4-8

June 11-15

June 18-22

June 25-29

July 2-6

July 9-13

 

An outline of topics to be addressed each day is presented below. This list is not complete; additional items are covered for most classes. If students are absent, they should consult these pages and check with the instructor concerning material missed.

 

Monday, June 4th

  Welcome to the course and introductions

  Summer Session policies

  Location of facilities

  My policies and what happens if they are violated

     Conduct

     No food or drinks in the lab

     Sit on stool or at desk - not on the table

     Do not change anything with the PCs - location, software, etc.

     Personal software cannot be loaded on these machines

     No net surfing or playing computer games

  Break for 10 minutes each hour - go outside

  The notebook I bring to class each day

  Distribute textbooks (when they arrive) - initial by your name to signify receipt.

  Time given in class to work all assigned problems (some reading outside of class)

  Computer accounts

     The initial password is password. Change it, write it on sheet of paper and give it to Nick.

     Do not give your password to anyone - using another student's account is a violation and will be reported.    

  History of the C++ language

  The Site

  Movies

  Writing a Java Program: Introduction

     High-Level LanguageÚ Compiler Ú Machine Language

  Eclipse Compiler

  Example program

 

Tuesday

 

  Picture: Place name you would like for use to use in the indicated block.

  Review of material covered last class

     The Eclipse compiler

     Opening a project and class

     Save on z drive - NOT c drive

     Output: System.out.println

     Java is case sensitive

     Data types

  New material

     Packages

     The swing package and the JOptionPane class

     import keyword

     concatenation operator

     parsing

  Practice: Run the InputOutput class

  Lab 1: Greasy Spoon Restaurant

 

Assume that you are the mananger of a restaurant. Establish a price for cokes, fries, and burgers and set a tax rate. Write a program that will

  Provide a greeting for a customer and announce the price of cokes, fries, and burgers.

  Take the customer's order.

  Announce what the customer ordered

  Announce the total bill, including tax.

 

Wednesday

 

  Review of last class

      packages: group or library of related classes

      import key word: allows access to packages specified

      concatenation operator: overloaded plus operator - joins string and number

      parsing: converting from String to a number

  GUIs: The showMessageDialog() method of the JOptionPane class

  Work on Lab 1

 

Thursday

 

  Control Structures

  Lab 2: Problem a

 

Friday

 

  Movie: Creation of the Computer

 

Monday, June 11

 

  Math and Random Classes

  Methods

  Lab 3: Methods, Exercise 1

 

Tuesday

 

  Methods: Example returning a character

  Random Numbers using the Random class

  Lab 3: Methods, Exercise 1

 

Wednesday

 

  Review

     Data types

     Control Structures

     GUIs

     Methods

     Random Numbers

  Lab 4

 

Thursday

 

  *This quiz is closed book, no notes or references of any kind.

  *No talking to anyone except me once I begin distributing the quiz.

  *If you must leave the room for any purpose, do so before the quiz is distributed.

  *Remove everything from your desk except the quiz and a pen or pencil.

  If you need additional space for a response, continue the response on the back and clearly

    identify which question is being continued both by the question and by the continuation.

  Print your responses.

  Write legibly – responses that cannot be easily read will be counted as incorrect.

  

Note: Violation of items marked by an asterisk (*) may result in your quiz being collected and a grade

          of 0 assigned.

 

  Arrays

 

Friday

 

  Donuts

      Group 1: Miroslav

      Group 2: Kevin

      Group 3: Chan, Sean

      Group 4: Riaan

      Group 5: Premdas, Christine

      Group 6: Kyle, Josh

 

  Movie: Computers

 

Monday, June 18th

 

  Exercise 1 Solution

  Arrays

  Lab 5: arrays, exercise 1

 

Tuesday

 

  Discuss Lab 5

 

Wednesday

 

  Strings introduction

  Review exercise tomorrow

  Discuss Lab 5

  Lab 6: EpicycloidalRectangles - Exercise at bottom of page

 

Thursday

 

  Applets

      Running

      Examples

      Lab 7: Applets, Exercises 1 through 4

 

Friday

 

  Graphics

  Lab 8: Graphics

    Create an applet with the title Using Java Fonts

    Print your first and last name in red, using Sans Serif, Italic, 14 point, Bold

    Draw a triangular shaped series of 30 lines below your name using green lines

    Draw a blue filled rectangle anywhere on the applet

 

Monday, June 25th

 

  Review: Random numbers

  Graphics Class Methods

      Will focus on JFrame instead of applets - rationale

      Java2D class

      Casting

      Font and Color (RGB versus color constants) classes

      translate and scale methods

  Lab 9: Exercise 1

 

Tuesday

 

  Casting

  Graphics Class - Java2D

  Lab 10: Exercise 2

 

Wednesday

 

  Presentations tomorrow

      Lab 9: Kevin

      Lab 10: Riaan

      WC: Kyle

 

Thursday

 

  Pictures

  Status of Java Labs Completed as of 6-27-07 

 

Lab

Riaan

Chan

Kevin

Miroslav

Kyle

Sean

Josh

Paris

Christie

1

ü

ü

ü

ü

 ü

ü

ü

ü

ü

2

 

 

ü

 

 

 

ü

 

ü

3

ü

ü

ü

ü

 

 

ü

 

ü

4

ü

ü

ü

ü

 

 

ü

 

ü

5

ü

ü

ü

ü

 

 

ü

 

ü

6

 

ü

ü

ü

 

ü

ü

ü

ü

7

ü

ü

ü

ü

 

ü

 

ü

ü

8

ü

ü

ü

ü

 

 

 

 

ü

9

ü

ü

ü

ü

 

 

 

ü

ü

10

 

 

 

ü

 

 

 

ü

 

 

  Review exercise

  Presentations

      Lab 8: Chan

      Lab 9: Kevin

      Lab 10: Riaan

      WC: Kyle

 

Friday

 

  Status of Java Labs Completed as of 6-28-07 ( = Very Good!)

 

Lab

Riaan

Chan

Kevin

Miroslav

Kyle

Sean

Josh

Paris

Christie

1

ü

ü

ü

ü

 ü

ü

ü

ü

ü 

2

ü

ü

ü

ü 

 

 

ü

 

ü

3

ü

ü

ü

ü

 

 

ü

 

ü

4

ü

ü

ü

ü

 

 

ü

 

ü

5

ü

ü

ü

ü

 

 

ü

 

ü

6

ü

ü

ü

ü

 

ü

ü

ü

ü

7

ü

ü

ü

ü

 

ü

 

ü

ü

8

ü

ü

ü

ü

 

 

 

 

ü

9

ü

ü

ü

ü

 

 

 

ü

ü

10

ü

 

ü 

ü

 

 

 

ü

 

 

  Donuts Order (Based on results of review quiz yesterday

      1st: Miroslav

      2nd: Chan

      3rd: Sean

      4th: Kevin

      5th: Paris

      The rest

  Pictures

  Exercise 2 answers

  Chan presentation

  Strings and input not using the JOptionPane GUI

  Lab 11, Strings, Exercise 1

 

Monday, July 2nd

 

  Open house is next Wednesday: 6 to 8pm in room 143

  Status of Java Labs Completed as of Today ( = Very Good!)

 

Lab

Riaan

Chan

Kevin

Miroslav

Kyle

Sean

Josh

Paris

Christie

1

ü

ü

ü

ü

 ü

ü

ü

ü

ü 

2

ü

ü

ü

ü 

 

 

ü

 

ü

3

ü

ü

ü

ü

 

 

ü

 

ü

4

ü

ü

ü

ü

 

 

ü

 

ü

5

ü

ü

ü

ü

 

 

ü

 

ü

6

ü

ü

ü

ü

 

ü

ü

ü

ü

7

ü

ü

ü

ü

 

ü

ü

ü

ü

8

ü

ü

ü

ü

 

 

 

 

ü

9

ü

ü

ü

ü

 

 

 

ü

ü

10

ü

 

ü 

ü

 

 

 

ü

 ü

11

ü   ü ü          

 

The alternative to the blinking light (meaning good)

 

is the animated monkey (meaning not good)

 

 

  Strings and input not using the JOptionPane GUI

  Lab 12, Strings, Exercise 2

 

Tuesday

 

  Status of Java Labs Completed as of Today 

    Dancing  Duke = Good

    Animated Monkey = Not Good

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

1

ü

ü

ü

ü

ü

ü 

2

ü

ü

ü

ü 

ü

ü

3

ü

ü

ü

ü

ü

ü

4

ü

ü

ü

ü

ü

ü

5

ü

ü

ü

ü

ü

ü

6

ü

ü

ü

ü

ü

ü

7

ü

ü

ü

ü

ü

ü

8

ü

ü

ü

ü

ü

ü

9

ü

ü

ü

ü

ü

 
10

ü

ü

ü 

ü

ü

 

11

ü ü ü ü    
12 ü ü ü ü    

 

Lab

Kyle

Sean

Paris

1

 ü

ü

ü

2

 

 

 

3

 

 

 

4

 

 

 

5

 

 

 

6

 

ü

ü

7

 

ü

ü

8

 

 

ü

9

 

 

ü

10

 

 

ü

11

     
12      

 

  Cryptography and Caesar's shift

  Lab 13, Strings, Exercise 3

 

Wednesday: No Class

 

Thursday

 

Current status of assignments submitted.

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

Kyle Sean Paris

1

ü

ü

ü

ü

ü

ü 

ü  ü  ü 

2

ü

ü

ü

ü 

ü

ü

  ü ü

3

ü

ü

ü

ü

ü

ü

     

4

ü

ü

ü

ü

ü

ü

     

5

ü

ü

ü

ü

ü

ü

     

6

ü

ü

ü

ü

ü

ü

    ü 

7

ü

ü

ü

ü

ü

ü

    ü 

8

ü

ü

ü

ü

ü

ü

    ü 

9

ü

ü

ü

ü

ü

ü     ü 
10

ü

ü

ü 

ü

ü

ü     ü 

11

ü ü ü ü          
12 ü ü ü ü ü        
13 ü                

 

  Cryptography and Caesar's shift

  Lab 13, Strings, Exercise 3

  Topics for remainder of course

 

Friday

 

Current status of assignments submitted.

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

Paris Kyle Sean

1

ü

ü

ü

ü

ü

ü 

ü ü ü

2

ü

ü

ü

ü 

ü

ü

ü ü ü

3

ü

ü

ü

ü

ü

ü

    ü

4

ü

ü

ü

ü

ü

ü

     

5

ü

ü

ü

ü

ü

ü

     

6

ü

ü

ü

ü

ü

ü

ü    

7

ü

ü

ü

ü

ü

ü

ü    

8

ü

ü

ü

ü

ü

ü

ü    

9

ü

ü

ü

ü

ü

ü ü    
10

ü

ü

ü 

ü

ü

ü ü    

11

ü ü ü ü   ü ü    
12 ü ü ü ü ü        
13 ü ü              

 

  Review of strings

  Presentations

 

Riaan Lab 10
Chan Lab 11
Kevin Lab 12
Miroslav Lab 13

 

  Work on labs

 

Monday, July 9th

 

  Pictures

  Sorting

 

Tuesday

 

Current status of assignments submitted.

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

Paris Kyle Sean

1

ü

ü

ü

ü

ü

ü 

ü ü ü

2

ü

ü

ü

ü 

ü

ü

ü ü ü

3

ü

ü

ü

ü

ü

ü

  ü ü

4

ü

ü

ü

ü

ü

ü

    ü

5

ü

ü

ü

ü

ü

ü

  ü ü

6

ü

ü

ü

ü

ü

ü

ü ü ü

7

ü

ü

ü

ü

ü

ü

ü ü ü

8

ü

ü

ü

ü

ü

ü

ü ü  

9

ü

ü

ü

ü

ü

ü ü ü  
10

ü

ü

ü 

ü

ü

ü ü ü  

11

ü ü ü ü   ü ü    
12 ü ü ü ü ü ü ü    
13 ü ü ü ü ü        

 

  Sorting: Bubble Sort and Selection Sort

  Order of Algorithms

  Comparison Graphs

  Lab 14

      Develop a one-dimensional array of 100 random integers in the range 1 to 99 (including 1 and 99)

      Print the elements of the array, appropriately labeled, 10 elements per line

      Bubble Sort the array

      Print the sorted results, appropriately labeled, 10 elements per line.

      Determine and print, appropriately labeled, the number of timesthe swap method is called.

 

Wednesday

 

  Open House - Robotics demonstration tonight 6-8 pm in room 143.

    Will periodically go to room 212 for other courses. Meet me in room 143 first.

 

  Current status of assignments submitted.

 

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

Paris Kyle Sean

1

ü

ü

ü

ü

ü

ü 

ü ü ü

2

ü

ü

ü

ü 

ü

ü

ü ü ü

3

ü

ü

ü

ü

ü

ü

ü ü ü

4

ü

ü

ü

ü

ü

ü

  ü ü

5

ü

ü

ü

ü

ü

ü

  ü ü

6

ü

ü

ü

ü

ü

ü

ü ü ü

7

ü

ü

ü

ü

ü

ü

ü ü ü

8

ü

ü

ü

ü

ü

ü

ü ü ü

9

ü

ü

ü

ü

ü

ü ü ü ü
10

ü

ü

ü 

ü

ü

ü ü ü ü

11

ü ü ü ü   ü ü ü  
12 ü ü ü ü ü ü ü    
13 ü ü ü ü ü        

14

ü

ü

ü

 

 

 

 

 

 

 

 

  Searching

 

Thursday

 

  Sorting

  Searching

 

Friday

 

  Donuts

  Course summary using my manual

  Current status of assignments submitted.

 

 

Lab

Miroslav

Riaan

Kevin

Chan

Christie

Josh

Paris Kyle Sean

1

ü

ü

ü

ü

ü

ü 

ü ü ü

2

ü

ü

ü

ü 

ü

ü

ü ü ü

3

ü

ü

ü

ü

ü

ü

ü ü ü

4

ü

ü

ü

ü

ü

ü

  ü ü

5

ü

ü

ü

ü

ü

ü

  ü ü

6

ü

ü

ü

ü

ü

ü

ü ü ü

7

ü

ü

ü

ü

ü

ü

ü ü ü

8

ü

ü

ü

ü

ü

ü

ü ü ü

9

ü

ü

ü

ü

ü

ü ü ü ü
10

ü

ü

ü 

ü

ü

ü ü ü ü

11

ü ü ü ü   ü ü ü  
12 ü ü ü ü ü ü ü    
13 ü ü ü ü ü        

14

ü

ü

ü

 

 

 

 

 

 

 

  Labs

    1.   Greasy Spoon Restaurant - Input and output and math calculations

    2.   Patterns - control structures

    3.   Grades - conrol structures

    4.   Stars - control structures

    5.   Arrays - one dimensional array operations

    6.   Epicycloidal Rectangles - Java Graphics class

    7.   Applets - introductory operations

    8.   Applets - triangles and rectangles

    9.   Java Graphics class - Random lines

    10. Java Graphics class - Random Rectangles - Random Ellipses

    11. String methods

    12  String methods and the Scanner class

    13. Caesar's Shift - String methods and the ASCII tale

    14. Bubble Sort - sorting algorithm

  Movies

      Creation of the Computer

      Creation of the Internet