ADDED 8.12.2007: This is the 221 page for SPRING 2007, for reference. Homeworks and many details are different for Fall, 2007--but not drastically different.
CSc
221 Software Design Laboratory Spring 2007
Prof. McCracken/
NAC 5/150
Prerequisite: CSc 212, Data Structures
Office: NAC 8/202E
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. Sigh. Seventh, actually.
It's published; it's what the bookstore has. I haven't seen it and don't know
how much difference there is. I will attempt--but I can't promise--to make the
course work for you whichever edition you have.
ADDED 4.21.2007: The second midterm, scheduled for Tuesday April 24, has been cancelled. Instead, we will have two quizzes. The first, on Thurs Apr 26, will cover the basics of generics and collections. The second, probably on Thurs May 3, will be on some Java-related aspect of the project, perhaps on processing dollar amounts stored as pennies. This will require some changes in how I compute grades. The syllabus speaks of "Tentative grading."
ADDED 4.21.2007: The final project will be a greatly simplified ATM. Click here to get to the final project page.
My problem with the second midterm is that it would have to be on something about the MVC design pattern, and you've already been tested on some of that twice. A third time would be pointless.
ADDED 4.13.2007: The "Swiss Bank Accounts" are posted.
ADDED 4.12.2007: HW6 is posted.
ADDED 4.12.2007: There is NO QUIZ today. Maybe I said, at some point in the past, that there would be. If so, that got superseded when I turned up sick that last day before the break. There WILL be a quiz, on the MVC design pattern as implemented in the temperature display program, on Tues April 17. The second midterm will be on Tuesday, April 24. You are responsible for everything in the course through HW6, but there will be a concentration on what we've done in connection with HW5 and HW6. You are responsible for as much as we do, on exception handling and layout managers, in HW6.
ADDED 3.14.2007: Click here for an overview of HW5, for which there are new teams. New stuff added 3.22.2007.
ADDED 3.13.2007: Click here for some tips on HW4, the JUnit group. Also has some pointers on strings, although there are no pointers in Java, of course.
Here's a summary of things that have been said piecemeal through the early sessions.
Jorge Castañeda, who took the course two years ago, found a tutorial on preparing JAR files: http://www.cs.laurentian.ca/badams/c1047/eclipse-tutorials/export-tutorial.html The author, who is Canadian but I can't find his or her name, had slightly different requirements on some details. You will have no trouble adapting to our situation, I think. If you don't like that tutorial, ask Google for a JAR tutorial; you'll get something over a million choices! Love the Web.
Goals 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 three copies on reserve in the Science Library. Check Barnes & Nobel and Amazon for used copies.
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 for 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, maps, and lists); accessing databases with JDBC and some selection from threads, generics, and serialization.
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.
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.
This is one of my favorite courses. I designed it and introduced it, and have taught it 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.
There will be two midterms and a major project, but no final.
Something a lot like HW1 in some previous semesters, but with various modifications. The course CD that you will receive has a “starter kit” version, a program that does part of the job. Your assignment is to modify it to include some additional fields and additional processing. There is a lot of new stuff here, for most of you. (Samples: allowable modifiers on top-level classes; extending a superclass vs. implementing an interface; constructors: when supplied, overloading; super and this; inner classes; event-driven programming with event listeners; JavaBean style for writing classes; more.) I don’t expect you to understand every detail of the program that you turn in. You will learn a lot doing the modifications, and we'll be back to all of the new concepts.
The assignment also involves an introduction to Eclipse, which will be the primary Java IDE for the course (although Eclipse is much more than just a Java IDE.) Click here to see the tutorial on Eclipse, updated to use this semester's HW1. Click here to see a screen grab of what might be your starting point, meaning that I will give you (on the course CD) a program that produces this image. You modify it to include a ZIP code and do a bit of error checking, for HW1.
See 221 Spring 2007 HW1 for a statement of the requirements.
For HW2 the main emphasis is on a lot of error checking, using Java facilities such as regular expressions—which every computer science and computer engineering student needs to know—and the methods of a class. Several additional fields, a more user-friendly interface, automatic positioning of the cursor in the next field when Enter is pressed, etc.
Curious? Here's the square root of 2 to 100 places:
1.4142135623730950488016887242096980785696718753769480731766797379907324784621070388503875343276415727
which is
979291172255376750081652821559640563801792871084643
divided by
692463428657900307544320387485120303323686251920582
The straightforward continued fraction will get you any number of correct decimal places, but it does get rather slow. You will be asked to use Google to find and implement a very much faster variation. . Search on Babylonian Method for finding the square root of 2. This is apparently the best method known, in the sense that it converges rapidly. It is also the earliest example of an algorithm. (If it seems like I've made two different assignments here, don't worry about it. We straighten such things out.)
Hmmm. What's missing? Well, polymorphism, in terms of a serious meaningful example. I'm still hunting for that good example. See the remarks above about Mickey Mouse assignments with threads. Same problem, so far.
Somewhere along the way I will make a valiant effort to introduce UML. The course is called Software Design Lab, after all, and the project requirements include a design. I have used CRC cards (Class/Responsibility/Collaborators) a few times, with mixed success.
Correction of possible misinterpretation. I may have made it sound as though every assignment is two weeks. Might seem to make sense: 14 weeks, 7 projects, = 2 weeks per project. But there are two midterms, which essentially use up a week, and the final project needs more like 3.5 weeks. Think of five projects at 1.5 weeks each, plus one at 2 weeks, plus midterms and the final project. Details may vary. (There is no final.)
A good homework assignment is one that you first look at and say, "There is no conceivable way I could do this in two weeks." Two weeks later you turn it in, correct and working, absolutely amazed at how much you've learned in two weeks. That's called a "challenge": something that forces you to struggle and stretch your wings, but which I know you really can do. I know of no better way that to learn this stuff. In fact I don't know of any other way to learn it.
This course won't make you an expert in Java or object-oriented design and programming, but you will know how to teach yourself the rest. At least this what former students have told me they like about my courses. The highest praise I can imagine, for any teacher.
Back to the top of the Spring 2007 CSc 221 page
Back to Dan McCracken's Home Page