CMPS 134
Computer Science I
Dr. Martin
T-Th 10:00-11:15 (Sec 01), 6:00-7:15 (Sec 31)
T 414

Text: Pascal Problem Solving and Program Design, Fifth  Edition, Elliot B. Koffman, Addison-Wesley 1995.
Index:
    Goals
    Labs
    Programs
    Text
    Syllabus
    Current Assignment

Goals
This course will provide a full introduction to personal programming as well as an introduction to computer science.  At the end of the course, you will be able to program unassisted using procedures, function, arrays, and records.  To accomplish this, we will cover in the text chapters 1 through 12 with a look at 13, 14, and 15.  See the course information booklet for more details.

We use laboratories in this course to introduce or reinforce some of the concepts and programs to test mastery. Programs and labs will be assigned regularly and are always due at the beginning of the class. Late work always loses points. Work will be gone over in class when returned.

Attendance is required. If you miss more than four classes, I have the option of lowering your semester grade by one level (e.g., A to A-). If you come in after attendance is taken, it is your responsibility to remind me to correct my records at the end of class. If you leave early without prior notice (or a reasonable explanation within a day or two), you will be marked absent. If you receive a grade lower than 100/150 (65%) on a test, you must see me in my office within one week. If you feel that an answer on a test or project has been graded incorrectly, you have one week to see me about it or the grade will not be changed. The projects will help prepare you for the tests if done carefully. Tests will always include programming.

Keep up with the course. Read the text along with the class discussion. Do labs early to get them out of the way. Understand what you have done after you have written a program. Know the vocabulary words. Be able to provide short answers applying concepts including those from labs. Study sheets about what a test will cover will be provided about one week before the test to help you prepare. All examinations will include programming. Try writing simple programs such as the exercises at the ends of the chapters in the text. Study with a friend.

About the Labs
Many of the labs are short (30-60 minutes).  Number 5 is considerably longer. All use the computer but none involve writing original programs. You will copy and run programs for various sets of data, recording the results. Some labs will require graphing the results. You may be asked to modify a program and run it again to observe differences. All will ask for short English descriptions of what you have observed. These labs are designed to introduce or reinforce concepts from the course. They can be a source of "easy" points if done honestly. Read the questions carefully. Even if you do not know the "correct" answer to a question, try to answer it. A blank will always lose points. A "wrong" answer may not provided that you have followed instructions carefully. Labs are normally assigned one week before they are due. You should start the labs early so that you can ask questions before they are due (if needed). Late penalties for labs are 20% for one class day; unacceptable after that.
About the Programs
There are five required programs in this course. They vary from an exercise using the editor to several significant computing experiences. Each will be a challenge when it is assigned. Late penalties are assessed but less drastically than for labs. Programs require much more time than labs and require documentation. Using the top-down methodology of the course, you will be able to start the framework for the programs before you will have all the tools needed to finish the program. Since programs are problems looking for solutions, you may need help in their writing. A visit to my office to discuss a program is common. Working with a group of other students is also a possibility but the actual program submitted must be individually yours. Help may also be obtained from a tutor from the Learning Resources Center but this can be dangerous. Many of the tutors are more interested in the challenge of writing a program than with helping you learn the concepts behind the program. This causes problems when you need the concept on the next test. Please note that the Help Desk at the computing center is for problems with tiger, not for help in the course!

Program #1:  Using the editor.
Program #2:  Writing the first simple program.
Program #3:  Writing a program with selection, loops, and files.
Program #4:  Writing a program with procedures and functions.
Program #5:  Writing a program with records and arrays.

About the Text
You are expected to read relevant material in the text and this booklet. The lectures will not provide all the information needed in this course. See the detailed outline to help coordinate the text and booklet with the lecture. In particular, carefully study all code examples in the book and understand why they are written as they are.
Syllabus

Vocabulary words in boldface must be mastered.

Part I:  Control-orientation

Chapter 1:
Overview. How to use the computer.  Terminology.
 compiler, linker, editor

Chapter 2:
Software development method.  Problem solving IPO approach, Pascal programming and the LSE, keywords and identifiers, Non-Psychic Programming Principle, Principle of Initialization, formatting program output, programming errors.
analysis, design, implementation, testing, maintenance, algorithm, assumptions (in program documentation), reserved word, standard identifier, declaration, data type, constant, variable, syntax, semantics, assignment, batch, interactive

Chapter 3:
Top-down design, structure charts (with data flow), procedures, functions, standard functions.
top-down design, procedural abstraction

Chapter 4:
Booleans, relational operators, Boolean operators, syntax diagrams, if statement, Principle of Paranoid Programming, tracing an algorithm, case statement.
control structure, boolean value, pseudocode, data flow

Chapter 5:
Repetition, while loop, loop repetition condition, standard controlled loops, loop design, for loop, repeat loop, debugging and testing programs.
counter-controlled loop, sentinel, sentinel-controlled loop, program flags, flag-controlled loop

Chapters 6:
Procedures, formal and actual parameters, functions, drivers, stubs, value and variable parameters, scoping rules, testing.
formal parameter, actual parameter, pre-condition, post-condition, local variable, global variable, non-local reference, value parameter, variable parameter, cohesive modules, function side effects, scope of a variable, recursion

 Part II:  Object-orientation

Chapter 7:
Simple data types: storage concerns, problem of testing real numbers for equality, Ord, Pred, Succ, Chr, subrange types, enumerated types.
cancellation error, arithmetic overflow, arithmetic underflow, representational error, ordinal data types, collating sequence

Chapter 8:
Input/Output and Text Files (booklet), difference between Read and ReadLn, EOLn and EOF.  (Much of this chapter was covered earlier.)

Chapter 9:
Software Engineering: system/software life cycle, prototyping, module libraries, reusable code, testing and verification, testing plan, white (clear) and black box testing, system boundaries, integration testing, assertions, preconditions, postconditions, ethics.
abstract data type, specification, implementation, testing strategy (plan), structured walkthroughs

Chapter 12:
Records, "with" structure, abstract data types revisited, arrays of records.
field

Chapter 10:
Arrays, strings, searching, sorting, analysis of algorithms (definition).
anonymous type, named type, sequential access, random access

Chapter 11:
 Strings.

Topics:
Recursion example/sorting and searching, structured (binary) files.