Main goal is to sit with your team. 

 +-> V -> F -> B -> I -> P -> D -> A -> S -> O -+
 |                                              |
 +----------------------------------------------+

This way you can presict from one seating arrangement the next. 

Here's homework nine related to your team names: 

https://www.cs.indiana.edu/classes/c212-dgerman/fall2017/hw09.html

Design Patterns: Object Oriented Best Practices

MVC and another one missing, otherwise all there. 

Question: what pattern(s) is/are missing? 

Semester Project: web programming with Java.

(a) web server (Tomcat) 

(b) Java servlets and JSPs

(c) simulate a NoSQL database

(d) use of the MVC design pattern

Sunday Help session was yesterday we have one every Sunday 2-4pm LH102. 

I will collect questions for it every Wed-Sat. 

Yesterday 3 people can't distribute but can explain the code we developed. 

1. What's the shortest program that keeps time? 

(a) there are Timer objects that you can use

https://stackoverflow.com/questions/4044726/how-to-set-a-timer-in-java

https://docs.oracle.com/javase/tutorial/uiswing/misc/timer.html

One such type of object is in javax.swing

https://docs.oracle.com/javase/8/docs/api/javax/swing/Timer.html

https://docs.oracle.com/javase/7/docs/api/java/util/Timer.html

Timers and buttons deal with ActionEvent's. 

https://docs.oracle.com/javase/8/docs/api/javax/swing/Timer.html#start--


import javax.swing.Timer; 
import java.awt.event.*; // for ActionListener and ActionEvent 

public class Example implements ActionListener {
  public void actionPerformed(ActionEvent e) { 
    System.out.println("I am getting older...");   
  } 
  public static void main(String[] args) {
    Timer t = new Timer( 1000, // delay
                         new Example() // your action listener
                        ); 
    System.out.println(t); 
    t.start();
  }
}


From Java Puzzlers:

Welcome to DrJava.  Working directory is C:\Users\dgerman\Desktop
> 2 + 3
5
> 123456 + 65432l   // 666666   777777
188888
> 12 + 2l                   // 33 
14
> 2
2
> 2l
2
> 0.6
0.6
> 0.6f
0.6


Question: 

  Design a simple game that relies on BigBang and World as discussed. 

  The game has a circle in it and you are just moving it up/down/left/right.

  BigBang.java and World.java are given (so assume them don't write them). 

  Provide Game.java and whatever else is needed.

Sign the paper and turn it in and we'll see you on Wednesday. 

--

http://www.javapuzzlers.com/

Tianyun's suggestion:

> 2l == 2
true
>

How come? (Same as the puzzle we discussed).