ELIZABETHTOWN COLLEGE

Computer Science Department



CS 122

Computer Science II
Spring, 2001



Professor: Dr. Thomas R. Leap Telephone (Office): 361-1299

E-mail: leap@etown.edu

Web: http://users.etown.edu/l/leap

Office: Nicarry 243

Office Hours: Mon-Fri 2:30 - 3:30, also, I am often in my office until 5:00

Other hours by appointment. Please feel free to request appointments by leaving a note on my door or in my mailbox or by leaving a voice mail message.



Course Objective



This course will continue the presentation of programming in the C++ language. Emphasis will be placed on algorithm construction using simple data structures, file processing and class construction. Specific programming topics will include string processing, array addressing, pointers, parameter passing and GUI programming in the Microsoft Windows environment using the MFC. The relationship between data structures and physical memory will be examined. Various programming methodologies will be examined such as step-wise refinement, top down design, bottom up design, structured programming and object oriented programming.



Specific programming objectives include:

Prerequisite: CS 121



Textbook



A First Book of C++: From Here to There, 2nd Edition, by Gary J. Bronson, ISBN 0-534-36801-8, Brooks / Cole Publishing Company, ©2000.



Microsoft Visual C++ is available on the computers in the Nicarry 108 and 208 laboratories. It may also be purchased through the College Bookstore at an academic price (less than $100). Contact the College Store manager to arrange a purchase. Delivery time is usually no more than one week.



http://users.etown.edu/l/leap/CS122.htm, the professor's web site.



Grading



85% 2 exams and a final comprehensive exam each of equal weight

15% quizzes, programming and homework assignments



Conversion from percentages to letter grades will be performed according to the following table with any fractional part being rounded off to the nearest integer:

B+ 88-89 C+ 78-79 D+ 68-69

A 93-100 B 83-87 C 73-77 D 63-67

A- 90-92 B- 80-82 C- 70-72 D- 60-62



Assignments



When handed in, all programming assignments must include a clean program listing including documenting comments as part of the program text and sample execution that sufficiently demonstrates that the program is fully working. All papers MUST be neatly folded to an 8 1/2 by 11 size with your name, the date, the assignment number and the title of the assignment in the upper right hand corner.



Laboratory



Open laboratory periods will be held in Nicarry 208, Monday through Friday, 3:30 - 5:00. Computer science student assistants will be in the lab at these times to give assistance if needed.



Attendance



Students are expected to attend class. The professor reserves the right to penalize a students final grade or dismiss a student from the course for excessive absences such as more than three unexcused cuts. Students can expect to have their final grade lowered one third of a letter grade for each cut beyond the first three. A medical excuse may be required if an exam is missed.



CS122 Course Outline

Topic Reading

  1. Visual C++
    1. Programming with Visual Studio 6.0
    2. Creating windows
    3. Menu bars
    4. Buttons/scroll boxes
    5. Window graphics


  2. Using the String class


  3. File processing Ch. 14
    1. File variables
      1. Opening files
      2. Closing files
    2. File operations
    3. Sequential file processing
    4. Random file processing


  1. Simple data structures
    1. Arrays Ch. 7
      1. One dimensional Section 7.1
      2. Searching and sorting Section 7.7
        1. Linear search
        2. Selection sort
        3. Bubble sort
        4. Binary search
      3. Two dimensional Section 7.4
        1. The game of Life


    2. Pointers Ch. 8
      1. Pointer vairables Sections 8.1
      2. Pointer operations
        1. De-referencing operator (*)
        2. Reference operator (&)
      3. Character string arrays and literals Section
      4. Parameter passing 8.4
        1. Value parameters
        2. Pointers as parameters
        3. Reference parameters
      5. Array processing with pointers Section 8.2

Topic Reading



    1. Strings Ch. 9
      1. The string class
      2. String operations
        1. Substrings
        2. Finding and Replacing substrings
        3. Inserting
      3. String functions


    2. Enumerations


    3. Structures Sections 10
      1. Structure definition (struct)
      2. Type definitions (typedef)
      3. Accessing structure elements
      4. Arrays of structures


  1. Classes Ch. 11
    1. Class members
      1. Accessing members
      2. Private/public members
      3. Member functions
    2. Constructor/Destructor
    3. Utilizing the class
    4. Function overloading
    5. Program organization
      1. Class definition header files - #include <header.files>
      2. Member function implementation
        1. In-line functions
        2. Separately compiled units