CSE 4051: Advanced Java Concepts (Spring 2008)

Department of Computer Sciences
fit wordmark

General info

Instructor

Ryan Stansifer <ryan@cs.fit.edu>

Office hours

Check my WWW page for up to date information, you are welcome to send me e-mail

Lectures

Lectures are from 12:30 pm to 1:45 Tuesdays and Thursdays in EC118. And available somewhere over the Internet.

Class URL

http://www.cs.fit.edu/~ryan/cse4051/

Mailing List

The class has a mailing list on the Florida Tech new Sympa list server. Please join, read and contribute to it. Important announcements will be sent to the list. Members can receive all e-mail sent to the list; also anyone can view the lastest postings via RSS: RSS feed icion

Course Description

We will learn the Java programming language and some of its libraries. Topics include: the core Java language, classes, exception handing, packages, threads, internationalization, GUI, applets, JNLP, networking, RMI, introspection (Java beans), JDBC, servelets [maybe] and cryptography [maybe].

Prerequisites

If you have not passed cse2010, do not take this course. If you do not like to write programs, do not take this course. Basic knowledge of the Java programming language is assumed, but the most important prerequisite is good programming skills.

No particular Java development environment is going to be explained or required. Some Java development tools suffer from problems that adversely effect this class:

  1. they take as long to learn as the language itself,
  2. they produce programs that don't run in other environments, and
  3. they make it difficult to control the appearance of the program.
In addition, they are sometimes not suited for program development in other languages (so you have to learn several development environments). I use emacs from the GNU project to write Java programs. But other possibilities include:

Please note that we review students' code in class from time to time. This is a very effective way of learning how to code (and how not to code), Such code reviews are standard practice in industry, but not usually in classes. If you are offended by this practice, then please do not take the clases.

Course Objectives

Reference Material and Textbooks

The textbook is the sixth edition of the book below. The fifth edition does not cover Java 5.0. A book is not required; it is for your reference only, we will not use any book specifically in the course of the semester. You may choose to buy no book, some other book, or any number of books---there are a large number of books on Java and no one book covers the content of this class. The book by van der Linden is the one best book that presents approximately what the class covers at approximately the right level for the usual students in the class. It is a good book and fun to read.
van der Linden Peter van der Linden.
Just Java 2, sixth edition.
SunSoft Press Java Series.
Sun Microsystem Press, Mountain View, California; Prentice Hall PTR, Upper Saddle River, New Jersey, 2004.
ISBN SBN: 0-13-148211-4, 848 pages.
book cover
It is important to get the sixth edition as it covers Java 1.5.

Lecture Material

Some of the material convered in this class has been collected on the WWW at:

http://www.cs.fit.edu/~ryan/java/language

Projects

The work in this course will consist entirely of writing programs. We will write about 12 programs. There will be no tests. The source code for all programs will be turned in using the submit server. You must register with the server before you can use it to submit assignments. Do not submit projects if you are not registered in the course for credit. Each class has a unique tag that identifies it. This class is "cse4051" (the tag is no longer case sensitive). Each project has a unique tag that identifies the assignment, e.g., "proj01", "proj02", etc.

All programs must run under Java 1.5.0 (that's what will be used in testing). All programs must run on all platforms (don't program OS dependencies into your programs).

Grading

Grades will based on a series of programming assignments. The numeric scores for the assignments are available on the WWW. The projects are due at midnight on Fridays. Sometime during the weekend the projects will be run on the test cases and printed out. Late projects are not accepted, but you may turn in the project after the Friday deadline in hopes of getting it in before the grading actually begins. Please note that network or other problems might render the submit server unavailable for brief periods of time. Please avoid waiting until the last minute to submit your programs. And, if a problem happens, submit your project at the earliest opportunity.

Programs that work, vary enormously in quality. Design, modularity, choice of algorithm, data structures, documentation, readibility, style, portability, extensibility, efficiency---these are the factors that go into grading. These are all subjective qualities that cannot easily be quantified. Roughly speaking, the longer it takes the grader to be convinced that the program works, the fewer points the project will receive. Like writing an essay, do not turn in your first, rough draft.

What about internal documentation (comments)? Careful documentation is evidence for careful consideration of the problem and will be rewarded. The key to comments is whether or not they make understanding the program easier. Comments should be grammatically correct, succinct, and add insight to the program. It is not necessary to write extensive general comments---you may presume that grader is familiar with overall description of the project. The most important audience for your comments is you! What comments would you like to see two months after you have written the code? Will you be able to figure out what the code does?

It is not required to use Java Doc (I don't think it is that great for the size of projects we do here.) However, you are welcome to use Java Doc style commenting, if you wish.

All class files are required to begin with a header in a particular format:

/*
 * Author: student name, e-mail address
 * Course: CSE 4051, Spring 2008
 * Project: project tag, short project name
 */
Unless otherwise specified, the project tag is the string proj followed by the two digit numeral 01, 02, 03, etc. If groups are permited to work on a project, other similar Author: lines should be included for co-authors (if any).
/*
 * Author: student name, e-mail address
 * Author: partner name, e-mail address
 * Course: CSE 4051, Spring 2008
 * Project: project tag, short project name
 */
Your name or names on the code is your pledge that this work is solely your own effort. If you receive help from any source, you must include a note to that effect in the header. For example,
  * Conversations with Don Knuth helped me figure out how to do IO.
  * The WWW site www.xxx.edu/yyy.html had a good explanation of the Knapsack problem.
  * The client/server example in van der Linden's book (figure 5.4) was the model for my code.

All programs are analyzed for a measure of similarity with other programs, current and past. Students whose programs are very similar to others will receive no credit. This policy is necessary to ensure that students take reasonable action to avoid and prevent plagiarism, and to ensure the proper recognition of independent effort. Without student cooperation the importance of course grades for individuals diminishes, as does the incentive for learning by doing it yourself. Please discourage your peers from cheating. You have more influence than I do. If you have evidence of academic misconduct, you should bring it to the attention of your instructor, Dr. Shoaff, or Dean Kalajian.

Writing a correct program is important, but learning to do it yourself is more important. Do not look at other students' (current or previous) code. Do not spend your time searching for the project solutions on the Internet. Do not allow other students (current and future) to examine or copy your code. Do not post, buy, or sell solutions to the projects. If you need help writing programs, then this is not the class for you. Do not denigrate the honest work of other students, by cheating. These rules do not prevent someone from getting help. Asking and answering specific questions on the class bulletin board is a great way to get help quickly and see problems in a different light. Do not ask:

Where do I start with project 8?
especially the night before the project is due. Instead ask:
For project 8 I read all the input first, before processing any of it.  Is this the best way?
The more specific you can be in the query, the more help you are likely to receive.

Style

My style guide can be found on-line. The style guide by SUN and is good. Some aspects of style can be checked mechanically. Good advice about writing programs in general can be found in Kernighan and Pike. Specific details about Java programming can be found in Haggar.
Kernighan & Pike Brian W. Kernighan and Rob Pike.
The Practice of Programming.
Addison-Wesley Professional Computing Series.
Addison-Wesley, Reading, Massachusets, 1999.
ISBN 0-201-61586-X, list price $24.99 US.

Haggar Peter Haggar.
Practical Java: Programming Language Guide.
Addison-Wesley, Reading, Massachusetts, 1999.
ISBN 0-201-61646-7, list price $32.99 US.

Block Joshua Block and Patrick Chan.
Effective Java Programming Language Guide with Java Class Libraries Poster.
Addison-Wesley Professional, Reading, Massachusetts, 2002.
ISBN 0-201-79120-X, list price $39.99 US.

Misc

Many students make careless mistakes such as using the wrong class name for the project, ignoring the input and output specification, etc. These mistakes make it difficult to evaluate and test the project. It would be nice to screen these problems before the "real" grading, but it is not practical to do so (as we want to do as many different projects over the course of the semester as possible). Please try to get it right the first time. Since attention to detail is an important hallmark of good programers, projects with such errors will receive very low scores.

Do not leave debug statements in your program; there should be no output that is not specifically requested. Do not devise elaborate debugging mechanisms and leave them in your program (even if they print nothing extra by default), they detract from the clarity of the program. Unnecessary code will result in losing points.

Do not prompt for input unless specifically required. Any extra output from your program may make your program fail all test cases. Many times the program output is compared character by character with the correct output (using the program diff).

Essential to readability is consistent indenting. I recommending indenting by 3 spaces--4 spaces wastes too much horizontal white space, and 2 spaces does not leave enough visual contrast. Also try to keep line lengths below 93 characters as that is the amount of space on a line when I print the programs.

You are responsible for producing the most readable program possible. One impediment to readable programs is the tab character. The tab character is interpreted by different software applications differently. A tab character makes it difficult to format your program properly. Since you have no control over how your program will be examined, a tab character in your program may result in loss of readability (and, hence, in loss of points). Take pride in the appearance of the programs you turn in, do not use tabs. Some program development applications use the tab key as an input command, make sure these applications can produce programs without tabs, or use different applications.

Any program with any non-printing characters (e.g., tabs) except for newlines (either NL, or CR followed by NL) will always result in immediate drastic loss of points.

A lengthy and detailed guide for the development of well-constructed programs in general can be found in the following book. It is full of practical advice and examples of bad and good program fragments mostly in C and Pascal.

Steve McConnell. Code Complete. Microsoft Press, Redmond, Washington, 1993. ISBN 1-55615-484-4.

A humorous guide to writing poor code can be found in "How To Write Unmaintainable Code" by Roedy Green.

Schedule

Tuesday, 8 January 2008first lecture
Friday, 11 January 2008Project #1: Bullseye
Friday, 18 January 2008Project #2: Bullseye [again]
Friday, 25 January 2008Project #3: Mayan Long Count
Friday, 1 February 2008Project #4: Shared DNA
Friday, 8 February 2008Project #5: Space Station Shielding
Friday, 15 February 2008Project #6: Life Simulation
Friday, 22 February 2008Project #7: Life Simulation [again]
Friday, 29 February 2008Project #8: Lunar Landar
3-7 March 2008Spring Break, no classes
Friday, 21 March 2008Project #9: SSDI Screen Scaper
Friday, 28 March 2008Project #10: SSDI Screen Scaper [again]
Tuesday, 8 April 2008 no class (ICPC World finals)
Thursday, 10 April 2008no class (ICPC World finals)
Friday, 11 April 2008Project #11: GUI for SSDI Screen Scaper
Thursday, 24 April 2008last lecture
Monday, 28 April 2008Project #12: Language Database

Syllabus

Week 1
Introduction, history, hype.
Week 2
Lexical tokens of Java, comments, primitive types, strings. Expressions and statements.

van der Linden, Chapter 3: Primitive Tyeps, Wrappers, and Boxing; Chapter 7: Names, Operators, and Accuracy; Chapter 5: Statements and Comments.

Week 3
Java implementations, bytecode and the JVM.

Information on the net


Ryan Stansifer <ryan@cs.fit.edu>
Last modified: Wed Mar 12 18:14:14 EDT 2008