COMP 14-090: Introduction to Programming

Summer I 2000
Monday - Friday     9:45 - 11:15 am   Sitterson Hall 014
http://www.cs.unc.edu/~clark/comp14

Instructor: 
Michele Clark
Email: 
clark@cs.unc.edu
Office: 
Sitterson 143
Phone: 
962-1909
Office Hours: 
Monday 1-2pm
Tuesay 2-3pm
Wednesday 3-4 (in Davis Lab)
Thursday 1-2pm
Friday 2-3pm

Overview

COMP 14 is an introduction to programming.  The major objective of this course is to teach you how to solve problems using algorithmic thinking.  An algorithm is just a sequence of instructions used to solve a problem.  We will express our algorithms in English, then translate them into the programming language Java.  During the course, you will learn how to use loops, conditionals, functions, arrays, and classes.  These are the building blocks of programs.  During the course, we will use these building blocks to create increasingly complex programs.  This course fulfills the Mathematics Perspective Requirement.

Prerequisites

This course has no prerequisites, but a basic background in math, especially algebra, is needed.  Basic computer skills (using a web browser, writing e-mail, using word processing applications) are assumed. 

Related Courses

COMP 4, Power Tools for the Mind
  • Teaches the use of spreadsheets, word processors, database tools, and exploring the Internet
  • Is fine for students who have no interest in learning to program
  • Fulfills a Philosophical Perspectives Requirement

    COMP 15, Introduction to Functional Programming

  • For students who have already had some experience in programming
  • Take this if you're majoring in Computer Science AND you have programming experience.

    COMP 114, Foundations of Programming

  • Take this if you are already a good programmer.
  • COMP 14 or COMP 15 are prerequisites for COMP 114.

    Textbook and Supplies

    Facilities

    The computer labs in the Undergraduate and Davis libraries are available and will be staffed with lab assistants (LAs) during the day.

    If you want to work at home, you'll need Java (Visual J++).  If you'd like a copy of Visual J++ for your personal computer, see Tammy at the Sitterson front desk. Note:  All work must be done on PCs running Windows 95/98/NT, no Macs.

    Time Commitment

    This course should teach you how to write good programs.  Since this is a major objective, you will have to write many programs.  (Remember, "practice makes perfect"?)  Expect to spend between 10-12 hours on each programming assignment.  This should not be the 10-12 hours before the program is due.

    In addition to programming assignments, reading assignments will be made on MWF.  You are expected to have read the assignments when you come to class.

    Class Policies

    Assignments
    Unless otherwise specified, all assignments are due at the beginning of class.  Each programming assignment must include a short memo which explains the purpose and results of the program.   The memo should also include problems encountered and questions still unanswered.   An overall header should be placed in the code which gives the programmer name, due date, course number, instructor, program number, pledge, and problem description.   All code should be documented internally to explain your algorithm.

    Each program will be graded in the following manner:

    Memo 25%
    Documentation 25%
    Program 50%

    The 25% points for documentation will be awarded if the code is well documented internally and is readable (e.g., is structured, has good visual separation, variables have meaningful names, etc.).

    More difficult assignments will be worth more points.

    Tardiness
    Please be considerate of your instructor and fellow students by being on time to class meetings.

    Absences
    Missing a day of class during a summer session is like missing an entire week during the regular semester.  University excused absences (including university functions and doctor's appointments) will be excused.  You are responsible for speaking with the instructor to find out what material and assignments you missed.

    Late Assignments
    Again, since this is the summer session, we have a short amount of time in which to cover the same material covered during the fall and spring semesters.  Homework and programming assignments are essential to your understanding of the material.  In particular, the programming assignments will each build upon the previous assignment.  If you fall behind in one assignment, it is likely that you will be behind for the rest of the semester.  Therefore, turning in assignments late is strongly discouraged.  You get 1 free late assignment, but all other late assignments will receive no credit. However, if you turn in all assignments on time, you may drop your lowest homework grade.

    Grading

    Components of Your Grade
     
    programs and homework 500 points (50%)
    quizzes and participation 100 points (10%)
    midterm  200 points (20%)
    final  200 points (20%)

     Grading Scale
     

    No A+
    94–100% A 90–93% A–
    87–89% B+ 83–86% B  80–82% B–
    77–79% C+ 73–76% C 70-72% C–
    67-69% D+ 60-66% D
    No D-
      < 60%  F  

      Grades may be assigned on a curve, but they will not be lowered.   For example, if you have a 90%, you're guaranteed at least an A-.

    Honor Code

    This is not an exhaustive list of Honor Code violations, but is here to serve as examples of inappropriate behavior. Each assignment must include the following signed pledge:
    "I have neither given nor received unauthorized assistance while preparing this assignment."

    Objectives

    Use this list to assess your knowledge (and help you study for the final exam) at the end of the semester.

     

  • You should be able to write a human-readable (read as, "well-commented") and organized program that includes loops, conditionals, and functions.
    1. Distinguish between for and while loops.  Give examples (not code) of when each loop should be used and why.
    2. Distinguish between the if and switch conditionals.  Give examples of when each conditional should be used and why.
    3. Distinguish between the class, array, and enumerated type data structures.  Give examples of when each structure should be used and why.
    4. Explain how to use abstraction to aid in the designing and writing of a program and tell why it is a "good thing."
    5. Can someone else read your program and tell what it does?
  • You should be able to analyze a program that someone else has written and be able to predict what it will do.
    1. What will be output?
    2. What if there are different inputs?
    3. Will the program terminate?
    4. Does the program do what it is supposed to do?
  • You should be able to find bugs and errors in programs.
    1. How can you test to see if the program does what it is supposed to do?
    2. Does the program do what it is supposed to do?
    3. Is there a fundamental flaw in the design of the program?
    4. Will the program handle any input?
    5. Will the program ever attempt to divide by zero?
  • You should be better able to solve problems in general.
    1. What is the top-down approach?
    2. What is an algorithm?
    3. Are algorithms restricted to the domain of computer science and mathematics?
    4. Why should we “divide and conquer” large problems?