CS 228 meeting -*- Outline -*- needed: the textbooks! * The course itself ** What is a data structure? -------------------- DATA STRUCTURE def: a *data structure* is a representation for a collection of related information. -------------------- Q: What are some examples from Scheme? lists and vectors. --------------------- def: an *abstract data type* is a description of data and its behavior under certain operations. --------------------- A data structure implements an ADT, an ADT describing a collection of information can be implemented by several data structures, it abstracts their behavior. Q: What is an example of an ADT that is not a data structure? integers or numbers (not a collection) in general any specification is an ADT, not a data structure ** history tell how this course came about (briefly) how I come to it the point is to have an intro sequence that is interesting, exciting, and fun ** objectives In one sentence the essential goal is for you to acquire skills and knowledge in imperative programming and data structures. ---------------------- Com S 228 OBJECTIVES 1. working knowledge of data structures --------------------- including - implementation data structures: arrays, records, variants, and pointers, and - how to implement ADTs such as: stacks, queues, lists, sets, trees, and algorithms such as: searching, and sorting. ---------------------- 2. Understand ADTs and their importance ---------------------- how to specify them how to implement them in C++ -------------------- 3. develop your design/programming skills for programs of 100-500 lines --------------------- This includes: - design and write code that uses previously compiled C++ classes - design and (informally) specify ADTs in problem solving - pick appropriate data structures - creatively develop algorithms --------------------- 4. Understand information hiding 5. Use asymptotic notation in rough estimates of time and space complexity 6. Reason informally about correctness ---------------------- summar: training and skills needed and introduction to data structures and algorithm analysis. ** skills --------------------- SKILLS WE TEACH IN 228 + data modeling, informal specification, matching data structures to problems + implementation of abstract data types implementation data structures (pointers, references, arrays, ...) when to use them + algorithm analysis and efficiency + ability to communicate clearly to humans good style, modularization, data abstraction + design principles, using/building data abstractions, information hiding + imperative programming in C++ use of assignment, types, classes ------------------- ** syllabus *** when note how the above connects with the meetings the class, and chapters of the book refer to syllabus for details *** prerequisites We intend to enforce the formal prerequisites as best we can, if you don't have these, drop this course. --------------- PREREQUISITES Credit or enrollment in Math 165 Com S 227 SKILLS NEEDED FROM Com S 227 + Familiarity with computers and Unix logging in, commands, editing, etc. + data modeling + small algorithm coding and development case analysis, recursion, iteration + ability to communicate clearly to humans helping procedures, modularization, right level of detail (abstraction) + handling input and output + avoiding redundancy using/building functional abstractions + imperative programming use of vectors, assignment, mutation --------------- Will assume you already understand recursion very well. If you already have credit for Com S 208, you can't get credit for this course, drop it. If you already have credit for Com S 212, I don't think you should be taking this course. If you are a graduate student, this course is not for you, drop it and just read a book (see me for suggestions). *** what work is involved think of this as like a math course, frequent problems to do, we go fast Estimates below from when I taught 228 in Spring 1995 (data estimated by students in answer to a question about how much time they spent per week outside of class studying and doing homework) ---------------- ESTIMATED TIME NEEDED FOR HOMEWORK Average: about 12 hrs/week. Mode: about than 6-8 hrs/week. Range: 0-5 to more than 22 hrs/week. ------------------------------------------ Distribution: 25% 6-8 hrs/week 16% 9-10 hrs/week 10% 19-22 hrs/week 10% 22-?? hrs/week but the latter two numbers are questionable, probably students trying to send me a message (less homework!) my guess is that students should plan on about 12 hours per week outside of class, but if they have a significant deficiency then it might be more like 18? ------------------------------------------ ADVICE ON TIME + try not to work the second 1/2 semester + if you work 20 hrs, only take 9 credits + if you work 12 hrs, only take 12 credits + don't take more than 16 credits with 228 ---------------- *** texts show them ---------------- TEXTBOOKS Required: Data Abstraction and Structures with C++ Recommended: C++ How to Program ---------------- *** grading ---------------- GRADING + No curve grading + Your grade is 2/3 based on tests 1/3 on homework ---------------- moral: use homeworks to learn, cheating on homework won't help details in course-policies handout, on-line in /home/cs228/public/doc/red-tape.txt *** ask for questions/concerns discuss them