Computer Science Department

Loyola College

 

CS 301 – Data Structures & Algorithms I

 

                            

 

                        

    

                        Instructor:       Roberta E. Sabin                                    

                             Office:             Donnelly Science 125E                      

Java                             Telephone:      (410) 617-2562

                             FAX :               (410) 617-2157

                             E-mail: res@loyola.edu

 

 

 

            Black Board Course Website:

                        http://www.loyola.edu/blackboard/index.html

      

                      Visit the CS Department WebSite: http://www.cs.loyola.edu

 

                                    Class Meets:  MWF 11-11:50 (in MH040)

 

Office Hours:      Monday, Wednesday, Friday:   10-10:50

                                                                  Other times by appointment or stop by.

                                    (I am usually here on MWF 8-8:50 and 12-12:50.  I am frequently in my office until 3 or 4 on MWF.)

 

 

                                                  

 

One must learn by doing the thing, for though you think you know it, you have no certainty until you try,                           --Sophocles, 5th century B.C.

 

In programming, it is not enough to be inventive and ingenious. One also needs to be disciplined and controlled in order not be become entangled in one's own complexities.

--Harlan D. Mills, Forward to Programming Proverbs by Henry Ledgard

 

The price to be paid for reliability is simplicity.                                                                                                                                       -- C. A. R. Hoare

 

Communicating what the code is supposed to do is more important than having it work right because someone is going to have to change it later.

--Carl Powell, 

 

Analytical Engine has no pretensions whatever to originate anything.  It can do whatever we know how to order it to perform.

                                                                                                                                                                                                    --Ada Augusta Byron, 1843

 

 

CS301                        Data Structures & Algorithms I                                        3 credits

 

COURSE INFORMATION

 

 

Catalog Description:

Prerequisite: CS202. Elementary data structures are designed and built using an object-oriented approach and language. Associated algorithms are analyzed for efficiency. Introduces a UNIX-based platform for programming.

 

 

Text:  Carrano, Frank M. and Janet J. Prichard, Data Abstraction and Problem Solving with Java, Addison-Wesley, 20056 (2nd edition).

 

Supplemental Material:

 

         Textbook materials for students: http://www.aw-bc.com/cssupport/Carrano.html

Java documentation (from Sun): http://java.sun.com/j2se/1.5.0/docs/api/index.html

Linux commands (from Linux in a Nutshell): http://www.linuxdevcenter.com/linux/cmd/

jGrasp download site and documentation:   http://www.eng.auburn.edu/grasp/

Java tutorial: http://chortle.ccsu.ctstateu.edu/CS151/cs151java.html  (slow, methodical, and very comprehensive)

 

             There are many, many additional resources on the Web relating to algorithms and data structures.

 

 

Course Objectives:

 

Upon successful completion of this course, you should be able to:

1.        understand the importance of the choice of data structures and the effect of those choices on program efficiency

2.        understand efficiency measures and judge the big-O efficiency of simple algorithms

3.        design data structures as objects and implement them in Java

4.        understand and use both top-down design and object-oriented design in software development

5.        use a Linux-based platform for writing, debugging, and testing software

6.        write well-designed, efficient, well-documented code in Java    

 

 

What you can expect of me: You can expect that I will come to class prepared and ready to help you learn.  You can expect me to be enthusiastic (easy--since I LOVE computer science and teaching!), be knowledgeable, and keep the class moving. You can expect me to be available during my office hours and at other times that you arrange to see me.  Expect me to return graded work promptly.  You can expect me to treat you respectfully.

 

 

What I expect of you:  I expect you to come to every class prepared to contribute to class—computing is an active sport.  You CANNOT learn it in the passive mode. This means that you should have completed the assignment, done the reading, and determined what you need help in understanding.  You contribute to class by intelligently questioning the instructor and offering further explanation to me and your classmates. I expect you to take responsibility for learning computer science—you won’t be sorry.  Further, I expect you to treat every other member of the class (including me) with respect.

 

 

 

 

 

 

 

 

Course Outline of Class Lectures: (notice that tests and quizzes are shown)

 

Class No.

Date

Topics

Reference (text)

1

1/17  W

Intro to the course

Review of software engineering principles

Introduction to Linux

Syllabus

2.1

2

1/19 F

Software engineering principles

2.2-2.3

3

1/23 M

Discussion of PA1

 

4

1/25 W

Simple recursion

3.1-3.2

5

1/27 F

Multiple recursive calls

3.3-3.4

6

1/30 M

ADT List

4.1-4.2

7

2/1 W

Implementing ADTs

PA1 due

4.3

8

2/3 F

Linked List review

Quiz 1

5.1-5.2

9

2/6 M

Operations with linked lists

5.2-5.3

10

2/8 W

Variations on linked lists

5.4

11

2/10 F

The Java Collections Framework

5.5

12

2/13 M

Using recursion: backtracking

6.1

13

2/15 W

Grammars and recursion

PA2 due

6.2

14

2/17 F

Mathematical expression of efficiency of recursion

6.3

15

2/20 M

Discussion of PA3

Quiz 2

 

16

2/22 W

ADT Stack

7.1-7.2

17

2/24 F

Implementing stacks

7.3-7.4

18

2/27 M

Stack applications

7.4-7.5

19

3/1 W

Connection between stacks and recursion

PA3 due

7.6

20

3/3 F

TEST 1

 

Spring Break March 6-10

 

21

3/13  M

Stack Applications: postfix evaluation and conversion

Graph traversal using a stack and using recursion

7.4

7.5

22

3/15 W

PA3 due

Connection between stacks and recursion

7.6

23

3/17 F

ADT Queue

Linked list implementation

8.1

8.3

24

3/20 M

Array-based implementation of a Queue

8.5

25

3/22 W

PA4 due

Simulations: time-driven vs. event driven

 

8.5

26

3/24 F

Simulations (con’t)

Quiz 3

 

27

3/27 M

Advanced Java: Inheritance

9.1

28

3/29 W

Abstract classes

9.2

29

3/31 F

Java Generics

Iterators

9.4

9.5

30

4/3 M

Algorithm efficiency: big-O

10.1

31

4/5 W

Efficiency of sorting algorithms

10.2

32

4/7 F

PA 5 due

Binary Trees

 

11.1-11.2

33

4/10 M

Quiz 4

Implementing an ADT Binary Tree

11.2

34

4/12 W

ADT: Binary Search Tree

11.3

35

4/19 W

BST efficiency

11.3

36

4/21 F

ADT Priority Queue

12.2

37

4/24 M

Using a heap to implement a PQ

12.3

38

4/26 W

Test 2

 

39

4/28 F

Final discussion of PA 6

 

40

5/1 M

PA6 due

Exam prep and final wrap-up

 

Exam:  Friday, May 5, 1PM , MH 040

 

 

GRADING

Your final grade will be determined by the number of points that you earn.  Approximately 1000 points will be possible this semester. They will result from:

Collected written assignments (approximately)                                                     = 200 points

4 quizzes                                                                                                                       = 100 points

6 programming assignments (approximately)                                                         = 300 points

2 tests (100 points each)                                                                                            = 200 points

1 final exam                                                                                                                   = 200 points

Total       = 1000 points

Final letter grades will be calculated on a scale close to the following: 


A  =  91 - 100% (905-1000 points)

A- =  88 - 90% (875-904 points)

B+ =  85 - 87% (845-874 points)

                         B  =  81 - 84% (805-844 points)

                         B- =  78 - 80% (775-795 points)

C+ =  75 - 77% (745-774 points)

C  =  71 - 74% (705-744 points)

C- =  68 - 70% (675-704 points)

D+ =  65 - 67% (645-674 points)

D  =  60 - 64% (595-644 points)

F  =   0 - 59% (594 or fewer points)


 

GRADING (con’t)

 

1.        Tests and quizzes are announced.  An entire period is devoted to a test.  Quizzes usually require ~ 20 minutes..

 

2.        A written assignment is normally made for each lecture. It is expected that the assignment be completed before the next class. Additionally, it is expected that the student complete the text readings apropos to the lecture before that lecture. Approximately 10 written assignments will be chosen at random and graded. Late assignments are normally not accepted. Assignments are assigned a value of 10 points. Generally, half the points are awarded for completeness and half for correctness. Correctness is determined by my checking all or a portion of the assigned exercises.

 

3.        Programming assignments will be given periodically. Generally 10 days to 2 weeks are provided for the completion of a programming assignment. Late programming assignments are NOT accepted, unless so stated when the assignment is given. Programming assignments are due at the beginning of the regular class period.

 

4.        Please keep a record of the points you have earned. This will enable you to calculate your current average and correct errors on my part.

 

 

 

 

 

CLASS PROCEDURES

 

1.     You are expected to have read the reference material listed in the class schedule before the lecture. The textbook presents material in a very concise manner. You will greatly enhance your experience of the lectures by coming to class prepared. I normally distribute many handouts--copies of notes, assignment sheets, etc.   In the past, many students have increased their success in this course by keeping classnotes, programs, tests, and assignments organized.  A three-ring binder is recommended (sections for  class notes, programs, home assignments, and programming assignments may be helpful.)

 

2.        I will use Linux directories and/or Blackboard for dissemination of class materials including copies of code snippets, classnotes, programming assignments, weekly assignments, data files, and important announcements.  Normally, you will submit your programming assignment BOTH in hardcopy and as a set of files in your folder of the lockbox folder on the Linux network.

 

3.        Regular attendance is necessary for success in this course.  As a point of courtesy, plan to arrive on time for class.   Students are responsible for material presented and assignments made during absences.  Normally, make-up exams are not administered and LATE ASSIGNMENTS ARE NOT ACCEPTED.

 

4.        This is a "hands-on" course.  Therefore, besides reading the texts, attending all classes, taking good notes, completing assignments and studying, to be successful in this course, you will need to spend a substantial amount of time in the lab or at your computer. Many students find they need five to eight such hours per week. Try to avoid pulling “all-nighters” to complete programming assignments.  No one thinks clearly or uses time effectively when he or she is exhausted.  Start planning a programming assignment when it is first distributed. Remember that the Linux Lab (DS130) is usually quiet and not crowded.

 

5.        Should you need extra help, please see me during office hours or make an appointment for a mutually convenient time.  Do NOT wait until you are totally lost and have failed a test or quiz.  Your success is my first priority.  Even if I am busy or seem distracted, please know that I am determined to be available to you for your assistance.

 

6.        Assignments that are not printouts should be submitted on standard size paper.  Please make them legible and neat. Illegible and/or sloppy assignments will NOT be graded.

 

7.        All assignments that are not pair programming exercises are to be completed by the student as an individual. Collaboration on algorithm design is encouraged.  However, sharing code (by any method) or answers to exercises is NOT allowed.  (See below.)

 

 

 

8.        Academic honesty is required of all Loyola students at all times.  It is expected that all students abide by the Honor Code:

 

The Honor Code states that all students of the Loyola Community have been equally entrusted by their peers to conduct themselves honestly on all academic assignments.

The students of this College understand that having collective and individual responsibility for the ethical welfare of their peers exemplifies a commitment to the community.  Students who submit materials that are the products of their own minds demonstrate respect for themselves and the community in which they study.

All outside resources or information should be clearly acknowledged.  If there is any doubt or question regarding the use and documentation of outside sources for academic assignments, your instructor should be consulted.  Any violations of the Honor Code will be handled by the Honor Council

 

Any copying of an assignment, whether electronically or by hand is considered plagiarism.  Students submitting non-trivial projects with identical structure will be considered to have acted dishonestly.  Such students may be referred to the Honor Council for disciplinary action.  At the very least, two or more students presenting assignments identical in all important aspects will share the points from a single grade.  Discussion among students on how to attack programs is encouraged.  However, as soon as code is exchanged, the line between collaboration and plagiarism has been crossed.  Code is exchanged not just when an electronic version is shared or a hardcopy is shared, but also when a student dictates to another the lines of code that are needed.  This is analogous to dictating sentences that someone should write in an English paper.  

 

You will be asked to sign the following pledge that will appear at the bottom of all tests and quizzes:

                "I understand and will uphold the ideals of academic honesty as stated in the Honor Code."

 

9.        If you have a disability of any type that requires an accommodation, please let me know as soon as possible.

 

 

 

 

 

 

PERSONAL PORTFOLIO

In the course of the semester you will author several programs of significant length and complexity.  You should consider maintaining a personal portfolio that contains your programs (specs, source code and the graded versions).  You will be able to add programs to the portfolio in subsequent courses.  Employers frequently want to see samples of the work of potential employees.  Like an aspiring artist, a portfolio can effectively show your creative efforts and your technical know-how.  A portfolio can help you land the position you desire or gain acceptance to the grad program you choose. . Plan now—graduation will be here before you know it.