Added 12.5.2005: Here is an emergency kit, if you are getting a message like "the sql driver was not found." Go to http://dev.mysql.com/downloads/connector/j/3.1.html and download the Connector/J for Windows. Pick a mirror nearby, like Secaucus. Extract it to somewhere you can find it again. Then in your Eclipse project, import archive and navigate to that location. You should end up with a number of entries like com.mysql.jdbc and similar. This is (at latest information) what Eclipse needs to know when it sees, in the Deitels' program 25.25 or 25.31, JDBC_DRIVER = "com.mysql.jdbc.Driver";
Seems to me we did this, but people are getting error messages. Good luck.
Swiss Bank Accounts last updated November 23, 2005.
Added 11.16.2005: There is a final project page. NEW 11.28.2005: A page of input for the database.
Added 11.16.2005: The requirements for HW6 have gotten badly confused because of too many changes. See a consolidated statement of what is required and what is optional.
Added 11.12.2005: HW6 due date is changed. For 221G it is now Monday, November 21, and for 221P it is Tuesday, November 22.
BUT: it's not all that hard. Check out the additions on the assignment page. Plan on getting to work on the final project next week.
Added 11.7.2005: HW6 is posted. It's the same as HW4 for 473. Difference: you get more time, and your assignment will be "enhanced."
Added 11.5.2005: If you are writing programs to use a HashMap and using Eclipse, you must set Window/Preferences/Java/Compiler/Compiler compliance level to 5. It's on the drop-down. 221 and 473.
Added 10.22.2005: HW5 is now posted.
Added 10.20.2005: There will be one midterm for the course. It will be:
Both exams will be closed book, closed notes.
Muslim students should talk to me about a makeup, since the date of the midterm coincides with the beginning of the festival of Eid Al-Fitr.
Added 10.3.2005: HW4 is now posted.
Added 9.30.2005: The HW3 post now has a consolidated statement of what you are expected to do.
Added 9.27.2005: A start of HW 3 is posted.
Added 9.20.2005: There is now the start of a useful links page. I will add to this as the semester goes along. A LOT of good stuff here!
Added 9.7.2005: Homework 2 is posted.
Added 9.4.2005: The price of textbooks is out of control. It would be good if everyone had a copy of the textbook listed for this course, but at $95 that is clearly impossible. I will provide you with texts or tutorials, or links to them, that will cover your needs for the course. Without violating any copyrights, of course.
You have Eckel's Thinking in Java on the second CD I provided. If you didn't get a copy I'll have lots more on Tuesday. It is also available from Barnes & Noble or Amazon, or downloadable from http://www.mindview.net/Books/TIJ/ . This URL is worth exploring.
I will provide links to useful tutorials. I will also post weekly reading suggestions in several sources. Eric Long's material is also on the (second) CD I provided. It is not a traditional textbook, and it takes a quite different approach--at the beginning--from what I am doing. I'll point out useful parts as we go.
Added 9.1.2005: Homework 1 is posted.
Added 8.30.2005: The link I couldn't find in class today is on the home page. It's called Eclipse Without Tears.
Resources. This will be expanded to a page. For now, here is a
page URLs to tutorials. See especially
http://www.idevelopment.info/data/Programming/java/PROGRAMMING_Java_Programming.shtml
This is an astonishing set of example code for a variety of intermediate and
advanced Java programming topics.
Added 8.22.2005: I strongly urge everyone to download the code examples at http://www.iut-info.univ-lille1.fr/docs/examplets/index.html They are from The Java Developers Almanac 2000, by Patrick Chan. Core ideas from JDK 1.4, with examples that are just big enough to show the syntax, without confusing details of some made-up illustration.
To get an idea of how thing went last spring, and to give you an idea of the scope of the course, please see the main page and links for the Spring 2005 courses, 221 Spring 2005.
CSc 221 Software Design Laboratory
Prof. McCracken
Section 221P: Tuesday and Thursday: 2-3:15 in NAC ?/??? NOT Shepard as shown in course schedule.
Section 221G: Monday and Wednesday 5-6:15 in NAC 6/307.
Prerequisite: CSc 212, Data Structures.
Office: NAC 8/202E Office hours 11-12 Tu&Th and before/after class.
Email: mccracken@cs.ccny.cuny.edu or ccnyddm@aol.com
Website: ccnyddm.com check for news, homeworks, etc.
Text: Deitel and Deitel, Java How to Program, Sixth edition, Prentice Hall, 2005.
The purposes of the course:
· To help you develop considerable proficiency in Java. We have a good text and I trust the lectures will help, but you will learn programming by doing it. You will be working on some kind of programming assignment at all times except exam days.
· To help you develop a reasonably full understanding of object-oriented programming: what it is, why it is important, and how to do it.
· To extend your command of what is meant by program design.
· To introduce you to the Java approach to compilation and execution, which involves the Java Virtual Machine executing bytecode. This is the heart of Sun’s slogan, “Write Once Run Anywhere.” We will see how this applies to code in everything from Enterprise computing (mainframes, which are definitely not dead) to the software that runs radios, car engines, anti-lock brakes, and a great many other things. It is the heart of IBM’s strategy for developing Web-based applications, using Java, Linux, and the DB2 (or any other) database system.
One of this text’s outstanding features is that all code examples are complete programs, and the programs are on the book’s CD as well as available directly from Deitel. I will be using these examples in many/most lectures. I don’t know how it will be possible to pass the course without a textbook. There are copies on reserve in the Science Library. Check Barnes & Nobel and Amazon for used copies.
There are significant differences between the fifth and sixth editions. The course CD contains a spreadsheet showing the approximate chapter match-ups.
I will provide each of you with a CD containing all the examples and considerable other useful material. We need to get off to a fast start, and time wasted finding stuff that I can easily provide you is an unacceptable waste of your time and of course time.
We will review the basic ideas of object-oriented programming (OOP). You should have seen encapsulation and inheritance, but probably not the third leg of OOP, polymorphism. We will study graphical user interfaces (GUIs) in some detail, although it will be impossible to cover more than a fraction of the power that Java provides. You will get enough experience with GUI development to learn the rest of the subject on your own; we need time to focus on things that are not so easily learned by oneself.
We will explore some of the advanced features of Java, things needed for any serious computing: regular expressions, collections (sets, map, and lists); threads; generics; serialization; and accessing databases with JDBC.
We will explore some of the ideas of the widely-accepted practices of Extreme Programming. One key feature is that most if not all projects will be done in teams of two people, who will work whenever possible at one computer: one person types, the other proofreads and makes suggestions. The two trade places regularly. I will form the teams, at least for the first half or more of the course. The preparation of a test plan is another key idea from Extreme Programming. Ideally, a testing program automatically runs your program against your test data. We will do that in two early assignments.
There will be two midterms and a major project, but no final.
I love email. Talk to me: ccnyddm@aol.com, or mail to mccracken@cs.ccny.cuny.edu will be forwarded there. I check my mail many times a day, usually. I can’t promise instant response on all occasions, but I try.
Tentative
grading, subject to change depending on how we do the project:
·
Homeworks: 25%
·
Quizzes (about 5): 20%
·
Midterm I: 15%
·
Midterm II: 20%
·
Final project, which will have
several separately-graded deliverables: 20%.
In computing your course grade I discard your lowest homework and your lowest quiz.
Revised grading, now that there will be only one midterm:
· Homeworks: 25%
· Quizzes (about 5): 25%
· Midterm: 25%. Midterm will be cumulative, covering everything done in the course, including HW 5.
· Final project, which will have several separately-graded deliverables: 25%.
This is one of my favorite courses. I designed it and introduced it, and have taught it probably 20 times. I never get tired of it, in large part because it’s always changing. I take great delight in showing people student projects, which are highly educational and satisfying to all. The switch to Java has certainly made the course more interesting for me, and now that Java is the world’s most widely used programming language, Java is really the only reasonable choice for the course.
NOTE: We will be using Java 1.5, sometimes also called Java 5. It has some neat features, and some of these are used in the sixth edition of the text. The course CD contains JDK 1.5 for Windows.
We will be using two IDEs (Integrated Development Environment): JCreator and Eclipse. JCreator Learning Edition is a free download. JCreator and Eclipse are on the course CD. You will see why we want both. If you have any reason to download Eclipse, which is free, be sure to get Eclipse 3.1. But it is on the course CD.
Sketch of the homeworks:
· HW 1 and 2: Modification and extension of a program with a Graphical User Interface (GUI). Regular expressions. Exception handling with try/catch blocks.
· HW 3: Computation of the sine, cosine, hyperbolic sine, and hyperbolic sine, from their Taylor series. A test program, in JUnit, is to be written first.
· HW 4: Building a Complex class, then using it to demonstrate that sin2x + cos2x = 1 holds for complex numbers. Maybe some teams will demonstrate numerically the beautiful Euler’s identity, e i π + 1 = 0.
· HW 5: The Model/View/Controller design pattern; building a GUI to display temperature.
· HW 6: Java Collections, with probable focus on the HashMap or HashSet. These require overriding the equals() and hashCode() methods of the Object class, the top of the class inheritance tree.
· HW 7: Collections used with threads and serialization.
· HW 8 = Final Project: A database of books, using MySQL and the Java Database Connectivity (JDBC) functions.
A lot of work? Of course. How else can you learn? It’s going to be the best 221 ever!