CS 9053 - Introduction to Java
2014 Summer
Mon/Thurs 5:30-8
http://cis.poly.edu/jsterling/cs9053
Instructor: John
Sterling
Office: 2 MetroTech, room 872
email: jsterling@poly.edu
phone: (718) 260-4138
Office hours: 4pm-5pm Mon / Thurs.
Course Description:
-
A detailed intensive introductory course in Java. See the schedule
below.
-
Not an introductory course in
programming. It is assumed that you have current
experience in programming, preferably in C++. If your programming
skills are "rusty", this will not be a good
course for you.
-
This is also not a course on J2EE. We will not
be discussing JDBC, EJB, servelets, JSF, JNI or other such
"advanced" topics.
Textbook: Core Java, vol One, 9th ed.; Cay Horstmann and Gary Cornell. (book website)
- An excellent reference and a pretty good read.
-
Not an introductory book, but rather a book on Java for
programmers. This is not the sort of book that you hope to get rid
of as soon as the course is over. Not unless you never intend to
program in Java again. (Ok, maybe when a new edition comes
out. This is after all, the 8th.)
-
Expect to read/study most of it by the end of the
semester. Yes, that's a lot of work. If you don't have the time
for it, then don't take the course at this time.
- Nice short comparisons with C++ are sprinkled throughout.
Also, look at the recommended books below. I will expect you to know
the material that we cover thoroughly. Doesn't matter to me where
you read / learn it.
How to succeed in this course
- The purpose of the course is to come away with a solid grasp
of what Java is and how to use it.
- In order to accomplish that you will need to read / study the
language and write a lot of code.
- You cannot learn a language without programming. A
lot.
- Just knowing the "ideas" is not
enough. If all we wanted were the ideas, then the course could
be a lot shorter.
- But even writing a lot of code will not result in a strong
understanding of a language unless you also study it.
- Just knowing how to write some code that works will
not be enough to do well in this course. Our goal is also to
understand the language and why it is the way it is.
-
Do not depend on an IDE to do your programming for you! I
recommend using a good programmer's editor and the standard java
compiler rather than becoming "dependent" on an IDE. Later, once
you know the language, an IDE (such as Eclipse or NetBeans) can be
a useful tool to increase productivity.
-
Pariticpate in class! The more active you are thinking,
asking questions and answering questions, the more you will
benefit from each lecture. (And the shorter they will
seem.).
-
Use the course discussion board on My Poly. Ask questions or if
you think you can help then answer them.
Lecture Schedule. This schedule is tentative.
Lecture |
Date |
Topic |
Reading |
1 |
5/29 |
Basics |
ch 1 & 2 |
2 |
6/02 |
Procedural Java |
ch 3 |
3 |
6/05 |
Introduction to Objects |
ch 4 |
4 |
6/09 |
Inheritance |
ch 5 |
5 |
6/12 |
Interfaces
Nested and Inner Classes
|
ch 6 |
6 |
6/16 |
Exceptions and Assertions
Basic GUI and Event Handling
| ch 11
ch 7-9 |
7 |
6/19 |
More GUI
Networks
|
|
8 |
6/23 |
Midterm |
|
9 |
6/26 |
Collections
|
ch 13 |
10 |
6/30 |
Concurrency |
ch 14 |
11 |
7/03 |
Concurrency |
ch 14 |
12 |
7/07 |
Concurrency
Generics
|
ch 12 |
13 |
7/10 |
Serialization
Regular Expressions |
|
14 |
7/14 |
TBD |
|
|
7/17 |
Final Exam |
|
Grading
Cheating
Cheating will not be tolerated. Do not copy anyone else's work. If
two people hand in essentially the same code, then both
students will receive zeroes for that assignment and also for another
(their highest scoring) assignment and may also face further
disciplinary action.
If you are at all confused by this then speak to me - ahead of time.
Assignments / Handouts
- Assignments, slides and code samples will be made available on Blackboard.
- Assignments are to be turned in electronically using Blackboard.
- Be sure to test your code. If your program does not work
properly, then document what fails in a comment. You will
lose more points if the grader has to find out that you have a
problem, than if you tell him.
- Essential rules for your code:
- Comments: Every file should have a comment at
the beginning identifying who wrote the code and what
the code is about / for. In addition the entire program should
be "reasonably" commented.
- Code that is hard to read will receive a low grade. Use proper indentation.
- Use suitable names for variables, methods and classes
- Break the problem solution up into reasonable functions.
- Avoid long lines. If I were to print your program out, it
should not have to wrap lines.
- Follow the conventions that
- class names begin with uppercase
- constants are all uppercase.
- methods and variables begin with lowercase. Use
uppercase to distinguish the second and subsequent words in
a name.
Other Resources
Recommended Books
The first two books below should be considered extremely
useful. If you have time to read more than just the necessary material
in Core Java, then using these books to help solidify what you have
learned would be a very good idea.
Do not use books based on Java 1.4 or earlier!
- The Java Programming Language. James Gosling, Ken
Arnold and David Holmes
- Very readable, especially in the beginning. I particularly
recommend the first chapter as an excellent introduction to
the language.
- Note that Gosling was the original designer of Java and
implemented the first Java compiler and the first Java Virtual
Machine.
- Effective Java, 2nd Ed. Joshua Bloch.
(website)
- Once you have some experience, this is an interesting
collection of almost 80 short topics giving insight into
"best practices". Reading it may well change your
opinion on some of your own coding practices.
- Bloch was one of the developers of the Java Collections.
- Don't get the first editon as it dates back to Java
1.3. The second edition came out in May, 2008.
- Available on Safari Books Online through Dibner Library on
My Poly.
- Just Java 2. Peter van der
Linden. (website)
- This is perhaps a more "friendly" book than Core
Java. Good as an introduction to many of the features of the
language, but not as thorough as Core Java and also poorly
editted in spots.
- Regardless of its weaknesses, I found it a decent read. He
has an enjoyable, generally clear style.
- Current edition covers Java 5.0. The author was apparently
using an early compiler for Java 5.0, so a number of times he
mentions using command line argurments that are no longer needed
with Sun's jdk.
- Available on Safari Books Online through Dibner Library on
My Poly.
- Thinking in Java. Bruce
Eckel.(http://mindview.net/Books/TIJ4)
- Another book that could be considered an alternate text. The
current edition covers Java 6.
- An earlier edition is availalbe online for free, but only
covers through Java 1.4.
- A bit wordy and while this might sound petty, I find the
formatting makes it tedious to read. However he does often have
interesting things to say.
- Head First Design Patterns. Freeman and Freeman.
- A "light" introduction to the idea of design
patterns using Java.
- You will find that design patterns are a popular topic on
technical interviews these days.
- Available on Safari Books Online through Dibner Library on
My Poly.
- Java Puzzlers. Joshua Bloch and Neal Gafter.
(website)
- 95 puzzles to explore your understanding of Java.
- Entertaining.
- While many of the problems explore somewhat extreme issues
in the language (i.e., they probably won't come up in your
coding), several do raise issues that are good for everyone to
be aware of and understand.
- Available on Safari Books Online through Dibner Library on My Poly.
- Big Java. Cay Horstmann.
- If you do need an introductory programming book
(which you shouldn't if you are registered for this course),
then here is one written by the author of Core Java.
Online Resources
- http://www.oracle.com/technetwork/java
-
My own Java for C++
Programmers. If you have any corrections, additions or other
suggestions to make, please let me know.
-
Cafe Aulait
(http://www.cafeaulait.org)
A Java website run by Elliotte Rusty Harold who taught this course
at Poly for several years. He is the author of a number of highly
regarded books on special topics in Java, such as I/O and network
programming, and also a number of books on XML.
Sun Certified Java Programmer Certification
Some students may be interested in taking Sun's certification
exam. I'm sure you can find lots of suitable links on the web. I
will just provide a few key points, links and a book reference.
- What we cover this semester should have you pretty well prepared for the content. But be aware that you will want to take advantage of study materials to prepare your for the kinds of questions on the exam and to train your eye to recognize the answers. They can be quite picky and tricky. You will, for example, be asked to "select all correct answers" to a multiple choice question. Get one choice wrong and you've blown the whole question.
- Some topics on the exam are just plain annoying (like date, number and currency formating), so will take some tedious studying and not just a careful read.
- Testing Objectives for the Sun Certified Programmer
certification examination with links to the relevant material in
Sun's Java
tutorials. (http://docs.oracle.com/javase/tutorial/extra/certification)
- Java Ranch (http://www.javaranch.com).
Calls itself "a friendly place for Java greenhorns!". A lot of focus on Sun's certification exams.
- Sun Certified Programmer for Java 6 Study Guide. Kathy Sierra and Bert Bates
- Draws a careful distinction between what you need for the exam and what you should know in the real world. Generally well written and readable.
Maintained by John Sterling (jsterling@poly.edu). Site last updated
August 17, 2013