Overview
This is an honors version of CS 2110/ENGRD 2110; credit is given for only one of CS 2110 and 2112. Transfer between CS 2110 and 2112 (in either direction) is encouraged during first three weeks. We cover intermediate software design and introduce some key computer science ideas. The topics are similar to those in CS 2110 but are covered in greater depth, with more challenging assignments. These topics include object-oriented programming, program structure and organization, program reasoning using specifications and invariants, recursion, design patterns, concurrent programming, graphical user interfaces, data structures, sorting and graph algorithms, asymptotic complexity, and simple algorithm analysis. Java is the principal programming language.
Instructor: Andrew Myers
Course information
Course Staff
Name | Position | Phone | Office/consulting hours | |
---|---|---|---|---|
Andrew Myers | Instructor | [point here] | 255-8597 | Upson 4133, Monday 11-12, Thursday 11-12 |
Chinawat Isradisaikul | TA | [point here] | Upson 328B Bay D, Tuesday 5:30-6:30 | |
Steve Gutz | consultant | [point here] | Upson 360, Wednesday 4:30-5:30 | |
Daniel Jeng | consultant | [point here] | Upson 360, Tuesday 4:30-5:30 | |
Kyle Hsu | consultant | [point here] | Upson 360, Friday 1-2 | |
Rocky Li | consultant | [point here] | Upson 360, Wednesday 11:30-12:30 | |
Norris Xu | consultant | [point here] | Upson 360, Tuesday 1:30-2:30 |
Prerequisites
Very good performance in CS 1110 or CS 1130 or equivalent course in Java or C++, or permission of the instructor. If you are unsure whether CS 2110 or CS 2112 is the right course for you, please talk to the instructor of either course.
Required Text
- Data Structures and Abstractions with Java, 2nd edition, Frank M. Carrano, Prentice Hall, 2007. ISBN 0-13-237045-X.
See also the Prentice Hall website for additional material.
Other Sources
- Data Structures and Problem Solving Using Java, 3rd edition, Mark Allen Weiss, Addison Wesley, 2006. ISBN 0-321-32213-4. See also Weiss's website for additional material. A required text from previous years.
- Program development in Java: Abstraction, Specification, and Object-Oriented Design, B. Liskov and J. Guttag, Addison-Wesley, 2000. ISBN 0-201-65768-6. An excellent source of material on designing and specifying abstractions.
- Java Precisely, 2nd edition, P. Sestoft, MIT Press, 2005. To access the entire book for free, login via the Cornell Engineering Library.
- Design Patterns, Erich Gamma, Richard Helm, Ralph Johnson, and John M. Vlissides, Addison Wesley, 1994. ISBN 0-201-63361-2. An extremely influential book on software engineering. According to Wikipedia, as of April 2007, the book was in its 36th printing and has sold over 500,000 copies in English and 13 other languages.
- Java in a Nutshell, 5th edition, David Flanagan, O'Reilly, 2005. ISBN 0-596-00773-6.
These titles are on reserve in the Engineering library, Carpenter Hall.
Grading and submission policies
There will be about 7 assignments, mostly programming but also some written problems, totaling to 40% of your score. The first 2-3 assignments will be done solo; the final project will be done with a partner.
Assignment late penalties:
- 1 day late: 10%
- 2 days late: 25%
- 3 days late: 40%
- >3 days late: 100%
Exams
There will be two prelims on March 8 and April 17. They will be 10% and 15% of total score respectively.
The final exam is on May 11 and will be 30% of your score.
Other components
We expect you to participate in class and elsewhere. 5% of the score will be for participation (in-class, Piazza, course evals) and for in-class quizzes.
Placeholder for schedule
Resources
- Java
- Interactive development environments (IDEs)
- Programming advice and resources
- Computer labs
- Support services
- Review the introductory chapters in the textbook and the Java reference books listed on the course info page.
- See Oracle's official Java Tutorial.
- Refer to the CS 1110 and CS 1130 websites, which contain numerous examples.
- For students with C++ experience, see this comparison of C++ with Java.
- How not to program
- Teach Yourself Programming in Ten Years
- Quines (Self-Reproducing Programs)
- Powers Of Ten
- Programming Quotes
- How To Become A Hacker
- How To Write Unmaintainable Code
- History of Operator Precedence
- Software Bugs & Glitches
- Doom for System Administration
- The International Obfuscated C Code Contest
- The Easter Egg Archive
- OOP Criticism
- Esoteric Programming Languages
Java
We will the use the Java 6 Standard Edition (Java SE 6) platform, which consists of the Java Development Kit (JDK) and the Java Runtime Environment (JRE). Java 7 is also ok, but we won't be using any features that are not available in Java 6. If you are using an earlier version than 6, please upgrade.
To find out which version of the Java Runtime Environment (JRE) you are
running, open a command window (in Windows, Start > Run... and type cmd
,
and in Mac OS X, Applications > Utilities > Terminal)
and type java -version
at the command prompt:
C:\>java -version java version "1.6.0_27" Java(TM) SE Runtime Environment (build 1.6.0_27-b07) Java HotSpot(TM) Client VM (build 20.2-b06, mixed mode, sharing)
This says I have version 6 installed (6 and 1.6 are synonymous).
If you are on a PC running Windows and have never installed a version
of the Java Development Kit (JDK) on your machine, you probably don't have it.
If you are on a Mac, you probably do. To find out, type javac -version
:
C:\>javac -version javac 1.6.0_27
If you get an error message or the version is earlier than 1.6, you must (re)install the JDK.
Installing the JDK
The JDK is already installed in CIT and ACCEL labs. However, installing it own your own machine will greatly facilitate your work. Please note that you should double check your work in a public lab, as privately owned machines occasionally exhibit different behaviors.
Windows and Unix
To download the JDK, visit Oracle's Java web site and download and install JDK 6 Update 27.
Mac
Oracle does not support Java for Macs. However, there is support available from Apple. If you are running Mac OS X version 10.4 (Tiger), 10.5 (Leopard) or 10.6 (Snow Leopard), your Mac already has the JDK installed. For 10.7 (Lion), you need to download and install it from here.
Compiling and Running from the Command Line
Compiling
Say your main class is MyProgram
and it is
contained in the source file MyProgram.java
.
If it is not in a package, navigate
to the folder containing MyProgram.java
and type javac MyProgram.java
.
If it is in a package (say myPackage
), the
source should be in a folder called myPackage
. Navigate
to the folder containing myPackage
and type javac myPackage/MyProgram.java
.
Running
From the same folder you compiled from, type
java MyProgram <program arguments>
if it is not
in a package, and java myPackage.MyProgram <program arguments>
if it is.
Specifying a Classpath
Sometimes you may need to inform Java where to find auxiliary
classes. You can do this with the -cp
option
to the java
command.
Supply a sequence of folders telling Java where to look
for classes, separated by :
(Mac) or
;
(Windows).
Brushing Up
For students with limited Java experience, we recommend the online notes from CS 1130, Transition to Object-oriented Programming as a refresher. This is a self-paced course consisting of several modules that you can go through at your leisure.
More Ways To Catch Up
Local Software
There are some basic Java utilities specifically for CS 2110 that you
may find useful. These are contained in a package edu.cornell.cs.cs2110
contained in a
.jar
file which you can download from here.
Follow the installation instructions on that page.
Javadoc documentation is also available.
IDEs
IDE stands for integrated development environment. The use of an IDE is the best way to develop Java programs. IDEs provide many valuable aids such as syntax checking, debugging, and refactoring that can save you a lot of effort.
There are many good IDEs. We recommend Eclipse, but you may use any one that you like, or none at all. Eclipse is installed in all the labs, along with some others. Early recitation sections will get you started with Eclipse if you are not familiar with an IDE.
Here are some links:
For consistency, the course staff use Eclipse with a common Java style. You can download the Eclipse style template here.
Programming
There are many valuable resources that can help you take your programming skills to the next level. Here are a few links:
General
Software Development Methodologies
Debugging
Just for Fun
Computer Labs
CIT Labs
Cornell Information Technologies (CIT) runs several computer labs across campus for all members of the Cornell community. The JDK and Eclipse are installed on these machines. Check here for locations and times of operation.
ACCEL Lab
You can also find the course software in the Academic Computing Center (ACCEL), located in the Engineering Library in Carpenter Hall. Any CS student may register for an account.
Support Services
Academic Excellence Workshops
The Academic Excellence Workshops (AEW) offer an opportunity for students to gain additional experience with course concepts in a cooperative learning environment. Research has shown that cooperative and collaborative methods promote higher grades, greater persistence, and deeper comprehension. The material presented in the workshop is at or above the level of the regular course. We do not require joining the AEW program, but do encourage students to join if they are seeking an exciting and fun way to learn. The AEW carries one S/U credit based on participation and attendance. The time commitment is two hours per week in the lab. No homework will be given. This is a wonderful opportunity for students to seek extra help on course topics in a small group setting.
Your fellow undergraduate students, who are familiar with the course material, teach the sessions with material that they prepare. The course staff provide guidance and support but do not actually teach the AEW course content or any session. A representative from the AEW program will be speaking about the program and registration procedures in lecture.
Your AEW liaison for this semester is Jason Zhao.
See the AEW webpage for further information.
Other Support Services
PROGRAM | DESCRIPTION |
---|---|
Student Resources For Engineering Students | This site has links to a variety of services. |
Free Computer Training | CIT offers free computer training throughout the semester. Email tts_consult@cornell.edu for an appointment. |
Student Web Services | This website collects services that are more general. |
Engineering Advising | Academic advising for engineering students. |
Arts College Student Services | A listing of general support services for a variety of concerns students may have. |
Tau Beta Pi | Tau Beta Pi Engineering Honor Society Tutoring Program. The members of Tau Beta Pi are selected for their academic aptitude and social commitment. They hold one-on-one tutoring sessions with students in courses that typically have a large enrollment of engineers. |
Learning Styles | Not everyone learns the same way. If you are curious about how you learn, check out this collection. |
Gannett | The Cornell University Health Service Center. For all health related concerns. |
CAPS | If you are experiencing emotional distress, we urge you to contact CAPS, the Counseling and Psychological Services. |
Dear Uncle Ezra | When all else fails, ask Uncle Ezra! |
Quick Links
Assignments
- Assignment 1: Radio recommender system [ Source code ]
- Assignment 2: Ciphers and encryption [ Source code ] (Last update: 2/15 5PM)
- Assignment 3: Data structures and web filtering [ Source code ] (Last update: 2/21 3PM)
- Assignment 4: Parsing and fault injection [ Source code ] (Last update: 3/12 12PM)
- Assignment 5: Graphical user interface design [ constants ] (Last update: 3/20 10AM)
- Assignment 6: Interpretation and simulation [ Source code ] (Last update: 4/12 12PM)
- Assignment 7: Distributed programming [ Source code ] (Last update: 5/1 11PM)
Other resources for programming assignments:
- Group project specification: Simulating Evolving Artificial Life (Last update: 4/30 2PM) [ constants ] (Last update: 4/30 2PM)
- Overview document requirements for group project assignments