Howdy. 

Adrian German
dgerman@indiana.edu
Luddy Hall 2010

Nick Faro
npfaro@iu.edu

Lecture here lab in GY226 at 1:30pm. 

 1. Name, username 
 2. Major, minor 
 3. Have you taken C212 before? If so, when? 
 4. Have you taken C211, C200?
 5. What class will you be taking after this one?
    I'm interested where in your plan is C241, C343?
 6. What goals do you have for this class? 
 7. Do you have any concerns or fears as we get started?
 8. Have you ever worked with an interactive textbook?
    Where? What was it doing? How did it feel? 

Syllabus: 

 Attendance             5% 
 Reading Assignments   
 Homework 
 Labs
 Exam 01
 Exam 02
 Exam 03
 Exam 04
 Semester Project  

Let's talk about the reading assignments: 

You need to purchase access to ZyBooksL 

Please provide the following instructions to your students. 

Copy into your syllabus, discussion board, etc.

Copy instructions to clipboard

Sign in or create an account at learn.zybooks.com

Enter zyBook code IUBCSCIC212GermanSummer2019

Subscribe. 

A subscription is $77. 

https://www.amazon.com/Better-Surgeons-Performance-Atul-Gawande/dp/0312427654/ref=sr_1_5?keywords=gawande&qid=1557243424&s=gateway&sr=8-5

https://www.amazon.com/Checklist-Manifesto-How-Things-Right/dp/0312430000/ref=sr_1_4?keywords=gawande&qid=1557243448&s=gateway&sr=8-4

 1. Data Representation
 2. Examples
 3. Name, arguments, types (signature)
 4. Purpose statement
 5. Examples of I/O
 6. Template, flesh it out 
 7. Tests

Suppose two numbers x and y are integers. 

Please calculate the largest. 

Use +, /, 2, absolute value. 

In this class we will study the Java programming language. 

Java is an object oriented programming language. 

Java programs are made of classes. 

How do we run Java?

 1. Command line.

 2. IDE

    BlueJ

    DrJava
  
    Eclipse

    IntelliJ

Our goal is to teach you the language. 

https://www.bluej.org/

Classes are containers.

They contain data and procedures. 

We call these members. 

Members can be static or non-static. 

-bash-4.2$ pwd
/u/dgerman/apache/htdocs/c212/sum2019/0507
-bash-4.2$ ls -l
total 4
-rw-r--r-- 1 dgerman faculty 24 May  7 12:04 One.java
-bash-4.2$ cat One.java
public class One {

}
-bash-4.2$ javac One.java
Picked up _JAVA_OPTIONS: -Xms512m -Xmx512m
-bash-4.2$ ls -l
total 8
-rw-r--r-- 1 dgerman faculty 180 May  7 12:06 One.class
-rw-r--r-- 1 dgerman faculty  24 May  7 12:04 One.java
-bash-4.2$

Classes serve the dual purpose of modeling. 

A class can be instantiated (any number of times) into objects.

You can put functions, procedures, method inside classes. 

Let's write a function that takes no arguments and returns 3.

public class One {

    public int fun() {
        return 3;
    }   
    
}

public class One {
    public int fun() {
        return 3;
    }   
    
    public static int max(int x, int y) {
        return 5;
    }
}

--

public class One {
    public int fun() {
        return 3;
    }   
    
    public static int max(int x, int y) {
        return 5;
    }
}

--

public class One {
    public int fun() {
        return 3;
    }
    public static int max(int x, int y) {
        return ( (x + y) + Math.abs(x - y) ) / 2;
    }
    public static void main(String[] args) {
        int result;
        result = One.max(2, 9);
        System.out.println( result );
    }
}