In this course, we will study a variety of data structures and algorithms that are important for the design of sophisticated computer programs, along with techniques for managing program complexity. We will use Java, a strongly typed, object-oriented programming language, throughout the course. Topics covered will include types and polymorphism, arrays, linked lists, stacks, queues, priority queues, heaps, dictionaries, balanced trees, and graphs, as well as several important algorithms for sorting, searching, and manipulating structured data. We will also study some mathematical techniques for analyzing the efficiency of algorithms. The central theme tying all of these topics together is the idea of abstraction, and the related notions of information hiding and encapsulation, which we will emphasize throughout the course. Weekly lab sessions will reinforce the concepts covered in class through extensive hands-on practice at the computer.
Intermediate. Students should have at least one semester of programming experience in an object-oriented language such as Python, Java, or C++.
Prof. Jim Marshall
Office: Ilchman Science Center 100
Phone: 2673 (from off campus: 914-395-2673)
Email: j + my last name + @sarahlawrence.edu
|Big Java: Early Objects, 5th Edition
by Cay Horstmann
Each Wednesday morning from 9:30-10:55am we will have a lab session in Ilchman Science Center 104. The lab sessions are mandatory. The purpose of the labs is to give you time for hands-on, structured practice with Java, and the opportunity to ask questions and receive individualized help. New material will usually not be introduced during lab. At the beginning of each lab session, I will hand out a set of programming exercises for you to work on individually, or with a partner. If you work with a partner, you should be sure to collaborate equally on writing, testing, and debugging your code as a team. The lab exercises will typically be due the following week as part of your homework assignment.
On-time attendance is required and expected for all class meetings and lab sessions. Given the fast-paced, cumulative nature of the course material, students who miss class risk quickly falling behind, and catching up can be difficult. At the beginning of each class, I will pass around an attendance sheet, which you should make sure to sign. If you arrive late and forget to sign the sheet, you will most likely be counted as absent that day. Although I realize that missing class sometimes cannot be avoided, your cumulative attendance record will influence your final course grade, and missing more than 3 classes or 1 lab session will put your grade in serious jeopardy. If you are unable to attend class or lab, please contact me about it as soon as possible. No student will be admitted to the course after the add/drop period ends.
I will often send out announcements to the class through email, so you are required to check your Sarah Lawrence email account at least once per day. I will use your @gm.slc.edu address because it is reliable and easy to remember. You should also check the course web pages frequently for code examples discussed in class, and for the homework assignments. I will be happy to answer your questions by email and will try to respond as quickly as possible to messages that pertain to the course.
The weekly homework assignments are the heart of the course. Assignments will be posted by the end of each week, and will be due the following Tuesday night by 11:59pm. Most assignments will involve writing, testing, and debugging Java code. You should expect to spend a substantial amount of time — several hours, at least — outside of class each week working on the assignments. Fortunately, programming is a lot of fun, and many students are surprised to find that they eagerly look forward to doing their programming assignments each week!
You will use a web-based submission system to turn in your Java files for each assignment. More details about using this system will be provided in class. Please DO NOT email your homework to me.
You should always include your name and the assignment number in a comment at the top of each file that you turn in.
Start each assignment as early as possible. Don't wait until the day before it is due. "I can't get Java to work on my computer!" or "My computer crashed!" or "I accidentally deleted my files!" are not acceptable excuses for failing to complete an assignment on time. You should always make backup copies of your files to avoid this type of situation.
Assignments submitted by the Tuesday night deadline will receive full credit. However, if you are unable to complete your assignment on time, you can still receive most of the credit if you complete it and submit it during the 3-day "grace period" from Wednesday up to Friday night. This will give you some extra time to seek further help or clarification from me. Assignments received after the grace period expires may be substantially penalized.
On some homework assignments, you may work with a partner if you wish, but you must consult with me in advance about this and obtain my permission. No more than two people may work together, and you and your partner are required to participate equally in designing, writing, and debugging your code. Furthermore, you must agree to work as a team before starting on an assignment. When working with a partner, please submit only one copy of your files. However, make sure to include both of your names in a comment at the top of each file. If you forget to include both names, only one person will receive credit.
The Java code that you submit must compile without generating any syntax errors. Code that does not compile will be substantially penalized.
Your programs will be evaluated on both functionality and style. As expert programmers know, programming is about more than just getting your code to run correctly on a computer. It is a highly creative activity akin to an art form, which relies as much on a sense of aesthetics and style as on technical mastery of the programming language. Programs should be written primarily for other programmers to read and understand, and only incidentally for machines to execute. Thus it is very important for you to develop a clear and consistent programming style, making good use of comments, white space, and well-chosen variable names. Your code should follow these general stylistic guidelines:
Homework assignments are evaluated on both the functionality and style of your code, according to the following rubric. To receive a ☆, your code must not only work perfectly, it must also be logically well-organized and easy to read (see the above stylistic guidelines).
|☆||Work of excellent quality that clearly meets or exceeds all of the assignment expectations. All programs work correctly on all of the input data, and are written in a clear, easy-to-read style.|
|✓+||Work of very good quality that meets most of the assignment expectations. Programs work correctly or mostly correctly for most of the input data, though some programs may have a few minor deficiencies or stylistic problems.|
|✓||Work of satisfactory quality that meets some of the assignment expectations and reflects a good effort overall, despite some deficiencies. Some programs work correctly or mostly correctly for most of the input data, but may have significant stylistic problems or other shortcomings.|
|✓−||Work of subpar quality that falls short of assignment expectations and needs improvement. Some programs have serious deficiencies, and work incorrectly for a significant portion of the input data. Nevertheless, the work shows some degree of effort and understanding.|
|−||Work of poor quality that exhibits severe problems, reflecting minimal effort or understanding. Many programs crash or work incorrectly for most or all of the input data.|
Projects will be due the last week of the semester. During that week, everyone will give a short presentation to the class on their conference work. You will also be required to turn in a short written project report. There are three options available for your conference work:
Your own project idea. If you already have a clear idea of what you would like to do, that's great. I am open to almost any computer science topic, although preferably one related to the course material.
A programming project. This would involve developing a sizable Java program over the course of the semester to perform some task. Your program would be expected to incorporate at least some of the data structures covered in class. There are many possibilities here: games, simulators, database applications, web applications, graphics, etc. Your project could be a stand-alone system, or could make use of Java's standard libraries or other third-party libraries. The project goal would be a working program, with separate well-written documentation, that you would demo for the class.
A research paper. This option would involve researching some topic related to computer science in depth, by developing a bibliography of books, articles, web sites, etc. and doing extensive background reading. The project goal would be a traditional 15-20 page, well-written conference paper on the topic. If you prefer, you could present your work in the form of a web site instead of (or in addition to) a paper. In this case, the same standards for good writing would apply to your web site.
At times you may find some of the course material to be quite daunting. But don't be discouraged! If you find it difficult, most likely so does the rest of the class. This is just a normal part of the process of learning to program. You are strongly encouraged to contact me as soon as possible whenever you are having difficulty with the material. If you are confused about something, don't stay that way! Staying confused will only make things worse later. Contact me as soon as possible so that we can clear up the problem. There is no point in staring at the computer screen for hours trying to figure out why your code won't work, when just a few minutes is often all it takes to track down the problem together. I'll also be happy to answer questions over email or schedule a meeting with you on Zoom if that is more convenient.
Do the reading before you come to class. Don't worry about total comprehension, but at least get a feel for what we will be covering. If you have some understanding of the material coming in, it will be easier for you to ask questions during class, rather than later, when I might not be available. Additionally, I will often discuss code examples in detail during class. If you have already done the assigned textbook reading, the examples will be much easier to follow.
Ask questions if you don't understand. This means both during class and while doing your homework. This course continually builds on previous material, so if you don't understand something one week, it will continue to be a problem the next week, and the week after that, and so on — until you finally do understand it. If you need help, contact me by email, ask me about it during class or lab, or ask your classmates — but first read the Collaboration Policy below.
Start the homework assignments early. I realize this is not always easy to do, but if you can get into the habit of starting early, you will be much better off. Here are two reasons to start early: (1) if you get stuck, there will be time to ask for help before the deadline; (2) you can always walk away, go do something else (like sleep), and come back later. I find I always have at least a few new ideas when I come back in a fresh state of mind. If you wait until the last minute, you can't do this.
Practice, practice, practice. The only effective way to learn this material is to consistently do the lab and homework assignments. Finish all of the assigned programs — and maybe even do some extra ones for fun! Even if you don't get them done on time, they will still help you learn the material.
If you have a disability that may interfere with your ability to participate in the activities, coursework, or assessment of the objectives of this course, or any of your other courses, you may be entitled to reasonable accommodations. Please contact Polly Waldman, Associate Dean of Studies and Disabilities Services located in Westlands 116. You may also call Disability Services at 914-395-2235 or email pwaldman at sarahlawrence.edu. Under the Americans with Disabilities Act and Section 504 of the Vocational Rehabilitation Act of 1973, all students, with or without disabilities, are entitled to equal access to the programs and activities of Sarah Lawrence College and the College will make reasonable accommodations when appropriate and necessary.
The highest level of academic integrity is expected of every student. You are strongly encouraged to discuss ideas and approaches to solving problems on a general level with your fellow classmates, but you are not allowed to share your program files, code, or solutions with others, or to make use of another student's code or solutions obtained via email, the Internet, or any other means of communication. I can almost always tell when two different programs derive from the same original source code, even if cosmetic changes have been made to it. The code you hand in must have been written by you from scratch, with the following permitted exceptions: code provided in class by me, code from the textbook, or code developed together with a partner if you are collaborating on a lab or project with my knowledge. In this case, you and your partner may freely exchange code developed as a team, and are jointly responsible for the work submitted. Under no circumstances may you hand in work under your own name that was done by someone other than yourself or your partner.
In all cases, if you make use of any code that was written by someone else in your assignment, including your partner, you must clearly acknowledge this in your code. This also goes for any help obtained via the Internet. When in doubt, credit the people or sources from whom you got help. If you are ever unsure about what constitutes acceptable collaboration, just ask. You are also responsible for carefully reading the College's official Policy on Academic Integrity in your SLC Student Handbook. Failure to abide by these rules is considered plagiarism, and will result in severe penalties, including possible failure in the course. Please do not put me, yourself, or anyone else in this unpleasant situation!