Department and Course Number Course Title CS 240 Computer Science I Course Mateen Rizki Coordinator Total Credits 4 Catalog Description Basic concepts of programming and programming languages are introduced. Emphasis is on structured programming and stepwise refinement. 3 hours lecture, 1 hour lab. For CS/CEG majors familiar with a high level programming language. Co-requisites: MTH 130 and 131 or MTH 134. Textbook Tony Gaddis , Starting Out with C++ Alternate 2nd Edition, Scott Jones Publisher, 2001. Language Microsoft Visual C++ 6.0 Compiler, (available in the library) Course Goals The student should learn: 1. 2. 3. 4. 5. 6. The basic terminology of associated with computer systems including hardware and software. The purpose of the tools needed to develop simple software applications including editors, compilers, linkers, loaders, and debuggers. Techniques for designing structured programs using stepwise refinement. The syntax and semantics of C++ excluding object oriented constructs. An appropriate style for writing and documenting programs. The techniques of locating and correcting both syntax and logic errors in code. The students should be able to apply these concepts and techniques to: 1. 2. 3. 4. Formulate a design for a simple problem given a detailed list of requirements and specifications. Implement a well-documented, readable program for a given design. Debug and test a program to verify that it meets requirements Hand-trace the operation of a simple program and describe its behavior. Prerequisites by Topic Knowledge of some high level programming language (e.g. Pascal or C) Major Topics Covered in the Course 1 Introduction to Computers and Programming Microsoft Visual C++ Environment Ch. 1 Appendix F 2 Introduction to C++: anatomy of a C++ program, basic data types and variables, simple arithmetic expressions, and free-form output Ch. 2 3 Expressions: operator precedence, data type conversion, and Ch. 3 type casting. Formatted input and output. Mathematical library functions 4 Boolean Algebra and Conditional Decisions Examination 1 (Covers Ch. 1-3) Ch. 4 5 Iterative Control Structures (while-loop): special operators, initialization, and termination. Ch. 5.1-5.6 6 Other loop constructs (for-loop and do-while loop). Special control constructs for loops: sentinels, continue statement, and break statement. Ch. 5.7-5.13 7 Controlling software complexity using functions: defining functions, calling functions, and passing information to functions. Ch. 6.1-6.6 8 Scope, visibility, and life-time of parameters and variables. Returning information from functions. Special features of functions. Examination 2 (Covers Ch. 1-6.6 with emphasis on Ch. 4-6.6) Ch. 6.7-6.18 9 1-dimensional arrays: initialization, access, and manipulation. Ch. 8.1-8.8 10 String arrays, n-dimensional arrays, and applications Ch.8.9-8.12 Laboratory Projects There are eight laboratory projects for the course. Each project is designed to explore aspects of the material presented during the previous week. Laboratory exercises typically require students to read existing code, make modifications, perform some simple analysis, or test some newly introduced language construct. Laboratory exercises are worth 20 points. If there is a pre-lab and in-lab component, each part is worth 10 points. The laboratory projects are evaluated based primarily on quality of the solution and accuracy of the results. (24% of the course grade) Programming Projects There are five programming projects for the course. Each project is designed to combine a few basic programming concepts in the context of a simple problem. High-level designs are typically provided and the students must refine the design, implement a solution, and test the resultant program. Projects require students to integrate several different language constructs into a larger framework to complete the assignment. Programming projects are worth 100 points. The projects are evaluated based quality of the design, accuracy of the results, documentation. (35% of the course grade) Estimate CSAB Category Content Data Structures Algorithms Software Design Core Advanced 1 1 Concepts of PL Comp Organization + Architecture Other Core Advanced 2 Oral and Written Communications There are no oral presentations. Students submit source code for their projects along with documentation. We do not claim that documentation constitutes written communications. Social and Ethical Issues Students are taught that code reuse is an effective technique for rapidly developing program, but when using pre-existing work, proper citations to sources are required. Theoretical Content None. Problem Analysis Problem analysis is limited. Problems typically require students to identify a few logical tasks within a problem. A typical example is to compute the surface area of some unusual geometric shape that requires a student break the problem into simpler shapes, identify required inputs and desired outputs (e.g. write a program to compute the amount of paint needed to paint a barn with a gambrel roof). Solution Design Potential designs for each project are reviewed in class. Design alternatives are presented and discussed. Problems related to programming projects are used as examples (e.g. write a program to compute the amount of paint needed to paint a A-frame house or a water tower might be used as a sample problem if the students are asked to solve the problem mentioned in the previous section). Students refine the sample designs for their projects and implement solutions.