Second eight weeks A290/A590 Intro to Java Adrian German dgerman@indiana.edu LH201D (Lindley Hall) 855-7860 MW I107 11:15-12:30 Lecture Optional Lab 10:10A-12:05P Thu GY 226 Class website: http://www.cs.indiana.edu/classes/a202/ Last semester's website: http://www.cs.indiana.edu/classes/a290-java/ Office hours: individual appointments that you can sign up on the web. Purpose: to give you an introduction to Java What is your background? Minute paper: 1. Name, username, major. 2. Reasons for taking this class: what you need to accomplish. 3. Expectations for the class, fears and concerns. 4. What would you like to be able to do at the end to feel accomplished (skill level). 5. What is your background in programming (do you know any programming, how much, what language(s) etc.)? 6. Anything else that comes to your mind and you want to mention. What we want to cover in this class: Introductory Track: learn the absolute basics (no experience required) Basics Track: intro to Java for programmers (one semester of programming experience) Advanced Track: clear goal (to be determined in person, discussion) Literals, expressions, operators, values, variables, types, assignment statements, conditions (boolean), if statements, loops; structure programs with procedures, functions, methods, subroutines. In an object-oriented language like Java we can't but use classes and objects to write programs. So we need to understand object-oriented programming: classes, objects, inheritance, dynamic method lookup, polymorphism. Then we look at cases where these concepts are used: applets and GUIs and event-driven programming. But we'll look at other traditional situations like: reading from a file, writing to a file, and basic networking (writing a simple web browser, or a simple web server). Data structures: arrays, Vectors, parameterized types, collections. Interfaces and abstract classes. Web programming with servlets, Java server pages and JDBC/MySQL. No exams in this class in the traditional sense. You need to come and turn in in person 5-10 projects which will be discussed in class but may have to be finished on your own or in lab. class One { public static void main(String[] args) { int sum = 0; for (int i = 0; i < args.length; i++) { sum = sum + Integer.parseInt(args[i]); } System.out.println(sum); } }