CS20
CS20
CATALOG DESCRIPTION:
CS 20 ADVANCED PROGRAMMING METHODS WITH DATA STRUCTURES USING
C++ 4 units
Design and implementation of larger programs in C++ using software engineering
principles. Emphasis on definition and use of data structures. Includes specification of
abstract data types, recursion, dynamic memory allocation, stacks, linked lists, queues,
binary trees, random access files, and use of hash codes. Prerequisite: Computer Science
15 or Computer Science 2 (completed with a grade of C or higher). 3 hours lecture, 3
hours laboratory.
Page 2
V. CONTENT:
A.
Data Abstraction
i. Concept of an ADT
ii. Typical operations in an ADT
iii. ADT implementation issues
2. Big O notation for determining time efficiency of algorithms
1.
Definition
2.
Simple examples: Time order sequential search and binary search
3. Dynamic memory allocation for data structures
4. Linear structures
1.
ADT:List
2.
Linked lists; singly and doubly linked
3.
Space/time comparison of use of array vs. linked list implementation
4.
Linked list applications
5.
ADT:Queue
6.
Implementation of queues by linked list and circular array
7.
ADT:Stack
8.
Implementation of stacks by array and by linked list
9.
Big-O time order of traversal, insertion and deletion for above data
structures;
10. Applications such as evaluation of postfix (RPN) and infix expressions
5. Implementation of algorithms that use ADTs (including implementations using the C+
+)
1.
Linked list
2.
Stack
3.
Queue
4.
String
6. Recursion
1.
Definition
Page 3
7.
8.
9.
10.
11.
Page 4
EVALUATION:
A.
Methods of evaluation
1.
There shall be a comprehensive, proctored, in-class final examination.
2.
There shall be an in-class, proctored midterm examination.
3.
There shall be either a quiz on each chapter of the textbook covered in the
course, or a second midterm examination.
4.
Students will be required to write and implement several assigned programs
of substantial size and complexity that utilize all topics included above in the
course of study.
5.
Students must design, code, test, and document at least one project
consisting of 500 or more lines of student-written code.
6.
Grading shall be based upon a combination of examination scores and
assignment grades.
2. Typical problems
1.
Quiz question: For best running time efficiency, a(n) ________ would be
chosen to implement a list where there will be frequent insertions and
deletions at random locations.
a.
Array
b.
Linked list
c.
vector
ii. Programming homework problem: Write a C++ program that
implements a recursive function to determine if an input string is a
palindrome.
iii. Final examination question: Describe the structure and function of
the heap. Explain a typical application.
iv. Final examination programming problem: Write a program
fragment that implements a template function to insert an object
into a doubly linked list.
v. Laboratory assignment: Create a vector of 100,000 random
integers and sort with quicksort. Write a C++ program that
measures and compares the execution times of functions that
implement a binary search and a sequential search of the vector.