CSIT 121
Computer Science I Fall 2004Syllabus and Course Policies
_____________________________________________________________________________________________
Instructor: Dr. Iyad Abu-Jeib
Office: 109 Fenton Hall
Office Phone: 673-4757
Office Hours: MWF 3:30-4:30 pm, T 1:00-3:00 pm.
E-mail: abu-jeib@cs.fredonia.edu
Website:
http://www.cs.fredonia.edu/~abu-jeib/Meeting Times:
Class: MWF 10:00 - 10:50 Fenton 174
Lab: T 9:30 - 10:50 Fenton 2164
Textbook: Programming and Problem Solving With C++, 4th Edition, by Nell Dale and Chip Weems, Jones and Bartlett Publishers, Inc., 2005.
Topics (not necessarily in order):
Program structure, data types (both built-in and user-defined), identifiers, statements, expressions, conditions, library functions, strings, files, if statement, while, do while, for loop, switch statement, break and continue statements, functions, parameters (by reference and by value), operators (logical, increment, decrement, etc), structures, classes & objects, arrays, header files (both built in and user-defined), recursion, formatting the output, scope, and related topics (to all of the previously mentioned topics). If time permits, we’ll cover other material. Some of the material we'll cover is not in the textbook.
Prerequisite: NYS Regents Course III or MATH 104 .
Grading:
Remark: There is a possibility (don't take that for granted) that I may not include attendance in the course grade. If that is the case, the 10% portion of the course grade that is assigned for attendance will go for the exams.
Attendance: Attendance is required (see above). You are responsible for material presented in class and for announcements announced in class. If you miss a class, it’s your responsibility to ask about the material covered in the class you missed and about the announcements announced that day. Make ups of exams/quizzes/worksheets are allowed only if you have a documented hardship. Late assignments won’t be accepted. Any measure to improve your grades (like extra-credit, extra points, and dropping a quiz/assignment (if happened)) may apply only to students who have satisfactory attendance.
Note: What’s stated above does not mean that I’ll give you extra-credit work or extra points or drop a quiz/assignment. I may do one of them or more of them or none.
Incomplete: Incomplete grade will be given only if you meet the university guidelines for incomplete.
Grading Scale: 92-100: A, 90-91: A-, 88-89: B+, 82-87: B, 80-81: B-, 78-79: C+, 72-77: C, 70-71: C-, 68-69: D+, 62-67: D, 60-61: D-, < 60: E.
Behavior: Inappropriate behavior will not be tolerated and may result in very severe consequences. Any behavior that may result in disturbing the class, students, or the professor, is inappropriate behavior. That includes (among others) repeated late arrival to class, not paying attention to the lecture, leaving early without informing the professor in advance and without having an acceptable excuse, reading a newspaper or something related or not related to class, talking to other students, sleeping, doing something not related to the course like working on a homework (even if it is for our class), reading a book (even if it is our textbook), using the calculator, etc. I reserve the right to consider inappropriate behavior as inexcusable absence. In addition, a student may be expelled from class the day he/she commits inappropriate behavior and even may be for the entire semester. Other and more severe actions are possible.
Remarks:
Objectives:
C++ is a high-level object-oriented programming language. Programming languages like C++ enable us to perform complicated and/or long tasks in a short time, with a great deal of precision and organization, and with reasonable efforts. They enable us to store the results on a file and retrieve them and use them whenever we want.
In this class, we will learn how to design C++ programs. Among the programs we will design, there will be programs involving:
1. How to read input data from the keyboard and how to display the output on the screen.
2. How to read input data from input files and how to display the output on an output file.
3. How to perform mathematical calculations.
4. How to sort and search data.
5. How to search an input file or an input statement or an input line for a specific character or string.
6. How to format the output.
Among the things we’ll cover, we’ll discuss:
1. How to organize programs (by using functions, classes, structures, header files, etc).
2. How to minimize the running time of the program and shorten the program (e.g. by using recursive functions).
3. How to find the output of a program and how to discover errors in a program.
4. Compile-time errors, run-time errors, and logic errors.
5. Programming style.
In this class, we’ll use Visual C++ (located within Visual Studio package) to compile and run our C++ programs.
Note: Visual C++ is different than C++ itself. It enables us to create user-interface programs with little efforts.
Why C++?
C++ is one of the most popular and powerful languages for both academia and industry. You always find companies asking for C++ programmers. And many of the data structures books and other computer books use C++ for writing their algorithms. C++ is widely used and will remain so for a long time.
C++ (A Brief History):
In the late 1960s and early 1970s, the programming language, C, was created at At&T Bell Labs by Dennis Ritchie. He created it because simply he wanted a language easier to use and to understand by people to replace the more difficult low-level assembly language that was the dominant language at that time. His idea of creating the C language came up when a group of people at the Bell Labs where designing the UNIX operating system which initially was written in assembly language. After Ritchie created C, approximately 90% of UNIX was reprogrammed in C. Ritchie called his new language C, because he adopted features from a programming language called B in C.
In 1985 another scientist of Bell Labs, Bjarne Stroustrup, created C++. C++ is just an expansion of C. It includes features for object-oriented programming and others. The new language (which includes C as a subset) was called C++ because it added more features to C. The ++ is the increment operator in C++ (e.g. M++=M+1 which means increment the value stored in the variable M by 1).
After C++ was invented, some companies added new features to it and so slightly different versions of C++ started to appear until it was standardized in mid-1998.
Basic Definitions:
Machine language: A computer internal language that consists of binary-coded instructions. Of course, the computer understands this language.
Assembly language: A low-level programming language that is easier for humans to use and to understand, but not as easy as high-level programming languages. We can say that assembly language lies in the "middle" between machine language and high-level languages. The computer does not understand this language (it is different than the language it understands which is called machine language) and so it needs a program to translate it to a language it can understand (machine code). The program that does that is called an assembler.
High-level language: A language that is easy to work with by people (like C++, Fortran, etc.). The computer cannot understand a program written in such languages (called a source program) without a translator (a program that translates such languages into machine code). The translator is called compiler and the machine version of the source program is called an object program. Every program you write in C++ or any other high-level language (source program) must be compiled (translated to an object program) before executed. When you run the program, control transfers from the computer’s operating system (a set of programs that manages the computer’s resources) to the program.