mahazuga: Mary Ann
* serepate: Serena
  hgarciah: Henri
* balbakr: Bakr
* ruifan: Rui
  mzelenin: Matthew
* jnp2: Jay
* zeyang: Zejun
* zhang486: Jingyun
* yiwecao: Yiwei
* rthammon: Ryan
* wang686: Jiaxing
* dweissma: Andrew
* kevcao: Kevin
* ssalmero: Salmeron, Santiago (TA)
* luo23: Yawen
* runxzhao: Runxia
* dgerman: German, Dan-Adrian (Primary Instructor)
  creba: Chris

Java programs are compiled, made of classes, main is a special method. 

Bytecode is for the JVM. 

In Java we use objects, like: BigDecimal, Scanner, JFrame etc.

In Java we can create our own classes: Horse, Unicorn, Penguin. 

Unit testing is something that supports TDD and BDD. 

In Java we have primitive types and reference types. 

In Java we have booleans, decisions (if, switch), nested ifs. 

In Java we can use loops (while, for, do-while).

In Java we can store values in (uni- or multi-dimensional) arrays and ArrayLists. 

In Java we should use JUnit to implement TDD/BDD. 

https://www.cs.indiana.edu/classes/c212-dgerman/sum2018/rctmpx/farcicandgarcia.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/sum2018/rctmpx/smart.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/sum2018/rctmpx/huntandthomas.pdf

In Java we have classes, with static and non-static members. 

https://www.cs.indiana.edu/classes/c212-dgerman/fall2017/lectureSix.ppt

public class Fraction { 
  private int num, den;

  public Fraction(int num, int den) {
    this.num = num;
    this.den = den; 
  }

  public int add(Fraction other) {
    return new Fraction(  this.num * other.den + this.den * other.num , 
                          this.den * other.den 
                        ); 
  }
}

https://en.wikipedia.org/wiki/Indentation_style

public class Fraction
{
    private int num, den;

    public Fraction(int num, int den)
    {
        this.num = num;
        this.den = den; 
    }

    public Fraction add(Fraction other)
    {
        return new Fraction(  this.num * other.den + this.den * other.num , 
                              this.den * other.den 
                            ); 
    }
    public String toString() {
      return this.num + "/" + this.den;   
    }
    public static void main(String[] args) {
      Fraction a = new Fraction(1, 2); 
      Fraction b = new Fraction(3, 5); 
      Fraction c = a.add(b); 
      System.out.println( a + " + " + b + " = " + c);
    }
}

In Java we can model in stages (extends). 

In Java interface is an element of pure design. 

Some famous interfaces: Comparable, Comparator, ActionListener etc. 

In Java abstract classes allow you to purify your design class. 

An abstract class allows you to diminish your concrete commitment to implementation. 

The class extension mechanisms creates the following phenomena: 

 -- inheritance 
 -- polymorphism
 -- constructor chaining
 -- shadowing of variables 
 -- overriding (dynamic method lookup) 
 -- this, this(), super and super()

 -- best practices (oodp, mvc). 

In Java we have Exceptions and we can't avoid them when we read from a file. 

Various ADTs have been developed: you have seen Map, Hashmap. 

Graphics and GUIs are based on Chapter 2, 9, 10. 

Same is true for event-driven programming. 

Chapter 12 is about design, like BlueJ and Homework 08. 

Chapter 12 is also like the Penguin labs. 

There is sorting (custom-made, merge, longestPrefix etc.) or standard.

Customized sorting is first and foremost recursive.

(Recall structural/generative recursion, and APS). 

Coming up:

  Searching

  Is their Recursion chapter any different

Next week: 

  The Java Collections Framework 

  Basic Data Structures

  Trees 

--

Last week:

  Graphs 

  Generics 

  Lambdas and Streams 

--

In lab today you will get help on Homework 08. 

Review materials and practice exercise and code to be posted tomorrow. 

Grades to be updated and new individual reports to be sent tomorrow. 

I am in my office tomorrow all day please make appointment and come. 

--