CSC-162 Introduction to Computer Programming

Spring 2012
Instructor: Roger Shore Class Schedule:
Office Location: Congdon Hall 150 MWF 1:25-2:30PM CSC-1720
Telephone: 841-9031 MWF 2:40-3:45PM CSC-3360
Office Hours: MWF 9-11:00AM TTh 8:00-9:30AM CSC-2210
TTh 11:30-1:10PM CSC-4210
Others by appointment Th 3:10-4:40PM COM-3881 3/1/12 - 4/19/12
E-Mail: rshore@linus.highpoint.edu Web site: linus.highpoint.edu/~rshore

Course Description: This course is an introductory to basic computer use and problem solving using a block structured language such as C++ or Java. The course emphasis will placed on the creation of correct, efficient, and easily modifiable programs.

Prerequisites: none

Course Materials:

  1. Savitch, Walter Problem Solving with C++ Addison Wesley, Inc.
  2. Time and patience.
  3. Account on the Linus (A PC running Linux). Linus can be accessed locally through Internet by using the address linus.highpoint.edu. This is where I develop and test all C++/Java programs. The C++ in this course will be generic. Programs written in this class should work on any machine with any C++ compiler.
Course Objectives: After successfully completing this course, you will be able to:
  1. describe hardware and software components in a computer system (PC or mini-computer).
  2. demonstrate a basic competency of the Linux(UNIX) operating system and utilities in a multi-user networked environment.
  3. describe and apply formal problem solving techniques.
  4. write logically correct, efficient, and easily modifiable programs using a procedural programming language (C++ language) on an PC or mini-computer.
  5. demonstrate a basic competency of Internet tools such as ssh and scp.

Programming Assignments:It is assumed that you will read the assigned chapters. Although the material may be summarized, lectures will be used mainly to further demonstrate the C++ language and to answer specific questions. The course is primarily a programming course. I suggest you use a top-down design with step-wise refinement to develop programs. Also, you should use pseudo-code or flowcharts to describe each level of refinement. Any two programs submitted by different persons but obviously written by the same individual will both receive zeros. Each program will be graded based on a varying number of points, 10-20 points, using the following criteria.

  1. STYLE 30%
    1. Indenting and layout. Is the program readable? Does indenting help debugging and reading? Are parts of the program clearly labeled?
    2. Identifiers. Are the identifiers meaningful and mnemonic? Do they describe their purpose?
    3. Documentation/Comments. Is the program reasonably commented? Does the commenting help both the programmer and the grader? Could another student in the class figure the program out?
    4. Attractive output?
  2. PROGRAM 70%
    1. Algorithm. Is the program sensible? Does it solve the problem in a reasonable manner?
    2. Modularity. Does the program take advantage of subroutines and functions? Are its separate parts easy to isolate for testing and debugging?
    3. Working. Does the program work? Does it fulfill the problem description, or does it solve some other problem? Is it written in a way that it lets shortcomings be recognized and fixed?
    4. Use of required commands?
  3. Late Penalty:Programming assignments will have due dates. You will automatically get an extension of 7 days if you miss the due date. The penalty will be 1 point per day late. No program will be accepted after 7 days of the assigned due date.
Course Policy:
  1. Attendance: Attendance will be taken daily at the beginning of class. You are expected to be present in every class meeting. If absent from class, you are responsible for all lectures, in-class exercises, assignments, and handouts. Caution: Being absent from class does not change the due date of assignments.
  2. Grades: Your final grade will be determined as follows:
    Component 8-10 Programming Assignments Assignments/Quizzes/ Class Participation
    3 Major Tests
    Cumulative Final Exam Total
    Weight
    20%
    15%
    45%
    20%
    100%
    Range
    93-100
    90-93
    87-90
    83-87
    80-83
    77-80
    73-77
    70-73
    67-70
    63-67
    60-63
    0-60
    Grade
    A
    A-
    B+
    B
    B-
    C+
    C
    C-
    D+
    D
    D-
    F
    You must score at least the minimum of a category to be given the associated grade, i.e. an average of 80 is a B- not a C+.
  3. Make-Up test will not be given. No make-up test will be given unless arrangements have been made prior to the day of the test. If you miss a test your final grade will be used in place of the missed grade. This means the percentage of the final exam will increase. If you miss the final exam, you will receive an F for the course.
  4. In-class worksheets, quizzes, and non-programming assignments must be completed on the assigned date and cannot be made-up.
  5. Homework: This will be assigned frequently. Some assignments will take minutes to complete others will take days. Opportunity for homework questions is given at the beginning of each class. Homework may be collected and graded occasionally.
  6. Cheating Policy: Don't Cheat! There will be no second chances. If you are caught cheating, you will receive an F for that test, assignment, program.
  7. Classroom etiquette:
  8. Lab etiquette:
Course Topics:
  1. Introduction
    1. Basic computer hardware
    2. Information about available computer equipment on campus
    3. Access to the computer equipment
    4. Login procedures
  2. Internet and the High Point Campus Network
    1. General Layout
      • linus.highpoint.edu (also known as cs.highpoint.edu or math.highpoint.edu)
      • linus-public.highpoint.edu
    2. Applications
      • remote connection to machines on the net: ssh, telnet, putty(ssh)
      • transfer files to remote on the net: scp, ftp, winscp(gui scp)
      • email
      • cygwin - (UNIX like environment in Windows - includes: C++, ssh, and scp. I will use this in class.)
  3. The Text Editor (vi or vim, xwpe, gvim)
  4. Linux (UNIX)
    1. General Layout - tree structure
    2. General Purpose Commands
      - ls, cp, mv, rm, mkdir, rmdir, locate, talk, ...
    3. Advanced Commands
      - grep, more, cut, pipes, ...
  5. C++ programming
    1. Program layout (Comments, identifiers, keywords)
    2. Data types - floating point, integer, character, string, enumeration
    3. Streams and File I/O (standard, redirection) - I/O
    4. Assignments and expressions
      • notation, integer and real operators,
      • boolean, bitwise, address, arrays,
      • structure/union, operator precedence,
      • arithmetic functions
    5. Procedures and functions
      • layout, Scope of identifiers,
      • parameters (pass by value, pass by reference)
    6. Sequence control
      • if statement
      • switch statement
    7. Loop control
      • for statement,
      • while and do while statements, break, continue
    8. Exceptions
      • try-throw-catch
    9. More on types
      • array, classes
    10. I/O Library
  6. Advanced topics
    1. sorting: bubble, selection, shell techniques
    2. searching: sequential and binary