CS 228 Data Structures and C++ Fall 1997

 

Instructor: Suraj Kothari Email: kothari@cs.iastate.edu

Office: 207 Atanasoff Phone: 294-7212 Office Hours: M W 1:30 - 3

Teaching Assistants: Olga Antropova , Ryan Mckenna , Baldeep Hira and Hao Xing

Lectures: M W F 11-11:50, Gilman Hall 1002

Recitation Sessions:

 

Sections

Time

Place

TA ( TBA in class)

A1-A2

Wednesday 8

Atanasoff B29

Olga

B1-B2

Tuesday 3

Coover 106

Ryan

C1-C2

Tuesday 4

Coover 104

Ryan

D1-D2

Tuesday 8

Coover 104

Bladeep

E1-E2

Tuesday 5

Marston 209

Bladeep

F1

Tuesday 10

Coover 105

Olga

G2

Tuesday 12

Coover 103

Bladeep

J2

Tuesday 11

Coover 320

Olga

 

Texts: C++ How To Program , Deitel / Deitel , Prentice Hall, 1994

Algorithms Data Structures and Problem Solving with C++ , Weiss , Addison-Wesley, 1995

Course Overview:

This course will cover following topics:

C++ : Recursive Functions, Arrays, Pointers, Classes, Templates, Inheritance of classes, Polymorphism

Data Structures : Link lists, Stack, Queues, Trees, Hash Tables

 

Lecture Schedule:

Topic

Reference material for reading

Approximate amount of the class time

Designing and documenting programs

 

3 lectures

Recursive functions

Deitel 162-170, Weiss 217-234

2 lectures

Structures, classes & object oriented programming

Deitel 346-389, 424-425, 433-453,465-471, Weiss 47-88

6 lectures

Arrays

Deitel 212-252

2 lectures

Pointers, Structures, linked-lists

Deitel 268-321, Weiss 3-42, 485-504

8 lectures

Stacks, Applications of stacks,

Templates

Deitel 604-617 , 708-712, Weiss 185-191, 461-464, 471-476, 351-374

5 lectures

Queues and Priority queues,

Applications of queues

Deitel 692-708, 713-716, Weiss 206-209, 465-470, 476-482, 396-412

5 lectures

Trees, Binary search trees,

Applications of trees

Deitel 716-725, Weiss 197-202, 508-517, 526-538, 337-345

6 lectures

Hash tables & applications

Weiss 202-205, 609-614, 630-632

2 lectures

Recitation Sessions:

Attend the recitation sessions regularly. The TA will answer your questions on assignments, and discuss practice problems during the recitation sessions. Review the assignment and prepare questions ahead of time in order to get specific help in the recitation sessions. The first recitation session will be on Tuesday, September 2. You should attend the same recitation section throughout the semester. Graded assignments, tests etc. will be returned in the recitation section.

 

Important Guidelines:

 

Course Packet:

Pick up a copy of the course packet kept at the copy shop (Prints Ltd., 2515 Chamberlain Street, Phone 292-3317).

 

Due Dates:

This handout contains a calendar which includes test dates and due dates for all assignments. Submit the assignments and reports according to the due dates on the calendar. If there are any changes they will be announced in the class and posted on the Web.

Programming Assignments & Submission Requirements:

There will be 6 programming assignments. For each assignment, you will have to submit: (i) an electronic copy of the code (to), (ii) a copy of the cover page, (iii) a hard copy of the code, (iv) 3-5 pages of documentation. The item (i) should be submitted before the class on the due date and the items (ii) through (iv) should be submitted in an envelop or a folder at the beginning of the class on the due date. The hard and electronic copies of the code must be identical. The cover page is included in the course packet.

You will need to have an UNIX account for the assignments. You can develop the code on any computer of your choice but ensure that the code runs on the departmental machine before submitting the assignment.

The coding and the documentation of assignments must be done completely independently. The penalty for copying assignments will be severe.

Usually, the assignments will be due on Fridays. The late submissions will be allowed on the following Monday, Wednesday or Friday and the penalty will respectively be 10%, 20%, and 30%. Submit any homework including the late homework in the lecture section only. For example, do not keep the homework in the mailbox or do not give it to the TA except when it is being collected in the class.

Required Documentation:

The written documentation is required for each assignment. Note that this documentation will be in addition to the inline comments you are expected to provide. Usually, 20% of the total points for each assignment will be for the written documentation. The document should be typewritten. Use 11 or 12 size fonts. The figures may be drawn by hand.

The documentation should include: (i) a neatly written logical solution, (ii) a description of main data structures and functions, (iii) a description of how the code relates to your logical solution, (iv) a description of tests cases and the logic behind selecting the test cases, (v) a list of known problems in the code you wrote. Whenever possible give a diagram which makes it easier to understand your logical solution. Provide pseudo-code. The pseudo-code should be high-level and considerably shorter than the actual code. Describe the relationship between the pseudo-code and the C++ code by numbering corresponding segments by identical numbers. Clearly identify known bugs in your code in the written document. To give you an idea of what is expected, a sample document is provided in the course packet.

Quizzes and Tests:

There will be three quizzes and three tests-- two during the semester and third one at the end of the course. The third test will be will be optional. If your Test III score is high, it will be used to modify your earlier test score. For example, if you get 60%, 70% and 82% then the first score will be replaced by 74.7% (1/3rd of the first and 2/3rd of the third test). The questions will be based on class discussions, practice problems, examples covered in recitations, and the reading material. You will be allowed to use the course packet (but no books or other notes) during a test or a quiz.

Help

Make as much use of the recitation sessions as possible. The instructor will help during his office hours. Outside the office hours, you can meet with the Instructor or the TA by making an appointment. You have been given all the due dates and Test dates in advance, plan your schedule accordingly. Work on a regular basis and do not wait until the last day to get help. Some restrictions will apply, for example, it will not be possible for us to debug your code. Come prepared with a list of specific questions when you come for help.

Grading Policy

The grades will be based on a straight scale of : 90-100: A, 80-89: B, 70-79: C, 60-69:D, 0-59: F. The instructor may or may not use + or - grades; if used the cut off points will only be determined at the end of the semester after all the scores are available. The weighted percentages will be as follows:

Surprise Quizzes 4%

Quizzes ( 3 ) 21%

Programming Assignments ( 6 ) 25%

Test I : 25%

Test II: 25%

Test III: optional comprehensive test to improve the grade in either Test I or II.

Make-up Policy

Make-ups will not be given for homework assignments. No make-up tests or quizzes will be given unless a prior arrangement is made with the instructor.

Academic Honesty

The coding and the documentation of assignments must be done completely independently. The penalty for copying assignments will be severe. Do not give copies of your code to any other student. Protect your directories and files. You will be penalized along with the person who copies your code. The University policy on academic misconduct will be strictly enforced.

 

Web Site for the class

http://www.cs.iastate.edu/~cs228/

Calendar Any change in the calendar will be announced in the class.

Programming Assignment

Due Date

Tests & quizzes

Date

1

Sept 5

Quiz1

Sept 12

2

Sept 19

Test 1

Oct 10

3

Oct 3

Quiz 2

Oct 31

4

Oct 26

Quiz 3

Nov 14

5

Nov 7

Test 2

Dec 10

6

Nov 21

Test 3

TBA

Practice Problems

During the first half of the semester, you are advised to do at least 10 practice problems every week. You are likely to do well on a test or a quiz if you complete the relevant practice problems before each test and quiz. During the second half of the semester, you will be spending more time on programming assignments and not required to do as many practice problems. The following table lists the practice problems by topics to be covered on quizzes and tests.

Solutions to some of these problems will be available on the Web. In some cases we expect you to check your answers by writing short programs. Solving the practice problems is an important part of the active learning process you are supposed to be engaged in. Solve practice problems before reading the solutions. Get help from the instructor or a TA if you have difficulty in solving the problems on your own.

Topics

Problems to do

Test or Quiz

Review of C++ :

Deitel: 1.4-1.9, 1.13, 1.16, 1.17, 1.19-1.22, 1.25, 2.3-2.15, 2.25, 2.26, 2.39, 2.42, 2.52, 3.1, 3.2, 3.4-3.8, 3.10, 3.15, 3.53, 3.60

will be covered on Quiz I

Recursive functions

Deitel: 3.49, 3.50

Quiz I, Test I

Structures, classes & object oriented programming

Deitel: 6.2, 6.4, 6.5, 6.8, 7.1, 7.2, 7.5, 8.15, 8.17

Weiss: 2.5-2.9, 2.11-2.14

Test I

Arrays

Deitel: 4.2-4.5, 4.12, 4.13, 4.18, 4.21

 

Test I

Pointers, Structures, linked-lists

Deitel: 5.3-5.7, 5.21-5.23

Weiss: 1.1-1.8, 1.11, 1.13, 16.8, 16.10

Test I

Templates

Deitel: 12.1, 12.8, 12.16-12.18

Weiss: 3.5, 3.6

Quiz II,

Test II

Stacks, Applications of stacks

Weiss: 11.2, 11.3, 11.7

Quiz II, Test II

Queues and Priority queues,

Applications of queues

Weiss: 6.1, 15.1-15.2, 15.4, 15.8

Quiz II, Test II

Miscellaneous problems on data structures

Deitel: 15.1-15.6, 15.8-15.10

Quiz III, Test II

Trees, Binary search trees,

Applications of trees

Deitel 15.23,

Weiss: 10.2, 17.5, 18.1

Quiz III, Test II

Hash tables & applications

Weiss: 19.5 a,c

Test II