CSC151 Data Structures

Overview

CSC 151 is the third core course in the CS major curriculum. Its purpose is to refine your programming and problem-solving skills to gain a sense of “programming maturity”. You’ve gained a lot of powerful tools in your study of programming constructs like loops, conditionals, and arrays. And you have worked in the object-oriented programming world of Java.

Now we focus on using those tools in a logical, efficient way to create modular, reusable programs instead of cumbersome, haphazard ones. We will again be programming in Java, and while we’ll be learning some new features of that language, our focus will be on good design, which is applicable to any language.

By the end of the course, you should be proficient in the following:

  • top-down design
  • development of modular, well-organized, reusable, understandable programs
  • a variety of debugging and testing techniques
  • space/time tradeoffs; other tradeoffs between various approaches to solving problems and storing data
  • analysis of space/time complexity of an algorithm and its comparison to other algorithms
  • a variety of data structures

We will aim to cover the following topics:

  • Code reuse through Java interfaces and generics
  • Mathematical comparison of algorithms and implementations
  • Data abstraction and information hiding
  • Linked lists and efficiency tradeoffs
  • Stacks, queues, priority queues
  • Trees
  • Graphs
  • Hashing

Prerequisites

You need a C- or better in CSC 120 (Programming on Purpose) to be eligible to take this course. You should already be familiar with Java. See your instructor immediately if you don’t meet these prerequisites.

Assignments & Grades

Each week I will give you some programming projects. You will complete these and hand them in, via Nexus, before the beginning of class the following week. There will be additional, occasional homework. There will be a midterm exam and a final.

Note that you must get a C- or better in this course in order to take any other course that requires Data Structures as a prerequisite.

Handing in assignments

You will turn in copy of your problem sets (and any associated code AND screen shots) and submit them electronically through Nexus (nexus.union.edu). Files must be sent through Nexus PRIOR to class on the day they are due.

Policies

In order to pass the class you must earn a passing grade. In addition, you must meet the following basic requirement. Before the final exam time for the course, you must submit all projects and homework (fulfilling the minimum requirements) and take both the midterm and final exams. In other words, you cannot blow off an entire paper or exam and pass the class! Note that this basic requirement is necessary but not sufficient to pass the class. Attendance

Class participation is a critical component of the course and attendance is mandatory. Please discuss any necessary absences (eg. athletics, religious holidays, emergency, illness) with me PRIOR to class. You may be asked to make up for missed material. You will not receive credit for make-up material if you did not discuss your absence with me prior to class. Late Assignments

Without prior agreement, there is NO late submission of assignments allowed.

Academic Integrity

Struggling on your own to figure out what to type next is where a lot of the learning happens in CS. Give yourself the opportunity to do this – ALONE. Here are some specific things to avoid (this is not a complete list):

Do not “work on the project together” with friends, especially if the group of you are each at your own computers and are always in lock step trying to figure out the same line or section of code at the same time. Do not give your code to another person or receive code from another person – EVER. You might think that it’s just helping out a friend, but it’s still plagiarism. Do not even look at someone else’s code unless it is to give that other person help. For example, if someone asks you to look at their code in order to understand an error message, that’s fine. If you are looking because you yourself don’t know how to write something and you need “inspiration”, that’s plagiarism.

Ok, so what should you do? Here are some tips:

  • Once you’ve struggled with something on your own and you’re still getting nowhere, ask for help! Email and visit me, go to the helpdesk, and, yes, ask your fellow students! They can’t show you code, but they can sure write down examples, show you demos, and explain things.
  • It’s ok to write pseudocode together. Get the logic down in English. Then go off by yourself and translate it to code.
  • It’s ok to read and write code together that is not part of the assignment, especially when it helps demonstrate the concept of what you’re being asked to do. Go through a class example together or maybe a demo. There’s no better way to understand something than trying to think up examples in order to teach it to someone else. Try it!

You’re going to write and see a lot of code in this class. A good question is: what sources can you legally take code from for your projects?

It is ok to reuse code…

  • that I hand out in class
  • that is part of a demo that I leave on Nexus
  • that is part of a homework assignment
  • that is in the textbook that we use for this course

It is NOT ok to reuse code…

  • that is part of someone else’s homework or project
  • that is on the Web/Internet
  • that is in other textbooks

Here’s the bottom line: except for the examples given directly above, you have to write all the code yourself, from scratch. For everything you turn in, you must explicitly cite any source (like a web page tutorial or a helpdesk person) that you use to help complete an assignment. Again, this is similar to writing an English paper; if you use a quote or material from someone else, you have to give credit where credit is due. Otherwise you are inappropriately plagiarizing or borrowing ideas. You don’t have to cite help from me, though.

An introduction to computer science and programming, motivated by examples from digital art, music and sound processing, and generation and manipulation of web files. Introduces students to algorithms, basic data structures, and programming techniques. All computing for the course will be done in the Python programming language.

Required Text

Introduction to Computing and Programming in Python: A Multimedia Approach, 4th Edition, Mark Guzdial & Barbara Ericson, Prentice Hall, 2015.

Assignments & Grades

There are numerous types of assignments for this course - programming is a very hands-on activity and the more you do, and the different ways you think about it, the better you will become at it.

Working together is a great way to more fully explore the concepts of the course. At the same time, independent work is also critical so that you fully understand the material on your own. Thus assignments are designed to balance opportunities to work together and individually. In lab, I am happy for you to work together. PLEASE indicate whom you worked with on your lab cover sheet. It is NEVER acceptable to collaborate for homework assignments.

There will be weekly homework exercises. Homework exercises are for you to play with and reinforce the concepts we talk about in class. Each person must hand in his or her own solution. Where these exercises require python programs, you MUST hand in working code. If a section of code does not work for you, it is ok to comment it out. This will be explained more fully at the appropriate time.

There will be two programming projects. These projects will combine different programming concepts and multimedia techniques, and provide opportunities for creativity. Each student must complete his or her own programming project. You may discuss algorithms with each other, but you may NOT look at each other’s code. To complete these projects on time, it is critical that you start each as early as possible and get help as soon as possible when needed.

At no point in the course, for assignments, labs or projects, may you use code you find from online resources such as stack overflow.

There will be labs where you will work on exercises in-class and receive help from your peers and myself.

There will be one in-class midterm exam, and a final exam that must be completed individually. There may be “pop quizzes” and independent in-class exercises. The intent is not that these be “punitive” in any way, but rather motivate you to keep up and provide feedback on your progress. Learning to program is like learning a foreign language: if you do not speak it during some part of everyday your progress will be quite slow.

Finally, class attendance and participation is a critical component of the course. Please discuss any necessary absences with me (see below).

Handing in assignments: For both homework exercises and programming projects, you will turn in a hard copy of the source code and submit the program electronically using the NEXUS website.

Whether you work on your own computer or on the system at Union, ultimately your programming projects and homework exercises must - so be sure to test it before handing it in. Labs and in-class exercises will also be submitted on NEXUS.

Grade Allocation

Homework exercises: 15% In-class exercises, quizzes and lab work: 15% Project 1: 10% Project 2: 10% Midterm: 20% Final: 20% Attendance and Participation: 10%