810:036
C/C++ Programming
Fall 2009

Instructor: Dr. O'Kane
Office: 318 ITT (East Gym)
e-mail: okane@cs.uni.edu
www http://www.cs.uni.edu/~okane
Tel 273-7322
Office Hours: Click Here
Book: C++ How to Program (6th Edition) (Paperback) Deitel & Deitel (Author) ISBN-13: 978-0-13-615250-7.
(Note: the link to Amazon is for reference purposes. The book is widely available from many sources.)
Requirements:
  1. Assignments: Approx. 6 counting a total of 40%. Assignments are due on the date specified. Late assignments will be discounted.
  2. Unannounced quizes. Total of 10% (Note: minimum grade of 50% if you take the quiz.) There will be no makeups for quizes.
  3. Two tests each counting 15 percent for a total of 30 percent;
  4. A final exam counting 15 percent;
  5. Attendance and deportment: 5 percent.

  • All tests are cumulative.
  • Assignments will be graded on functionality (i.e., do they work), structure and style. Structure includes clear and efficiently written code. Style includes documentation, indentation and overall readability. Documentation includes comments. Programs without comments are unclear and unreadable.
  • Please note that assignments count for 40% of the final grade. The Even though I blew off half the assignments, I'll do well because I did well on the tests theory is false.
  • While much of the material is from the book, a significant portion will be from the lectures. You are responsible for all material presented in class. Consequently, attendance is required.
  • Assignment submissions:
    • On-time except for a verified excuse. Late assignments not accepted. Assignments are due at the beginning of class.
    • Neatly printed and stapled. Clever edge and corner folding to attach multiple pages will not be accepted nor will paper clips.
    • Your name, the course, the date, the subject of the assignment and the assignment number will appear in a comment block at the beginning of each assignment. Non-complying assignments will be returned ungraded.
    • Assignments will not be accepted by email.
    • No screen-caps unless graphic output is involved.
Makeup Tests Makeup tests will be given only in cases of documented and demonstrated need for causes such as serious illness, family emergency or University sanctioned schedule conflict. Note: all makeup tests will be essay format.
Test dates:
  • Test 1: Mon Oct 5, 2009
  • Test 2: TBA
  • Final: TBA
  • Final Grades Final grades will not be available via email. If you want your grade mailed to you, bring a stamped, self-addressed envelope to the final.
    Originality If your work duplicates in whole or in part the work of someone else, both works will receive a grade of 0. If this occurs twice, a final grade of F will be assigned.
    Classes Classes are lecture format. Cell phones, laptops, pagers and PDA's may not be used. You are encouraged to bring your book to class and take notes.

    You are responsible for all material presented in class. If you elect not to attend, you are responsible for obtaining the material you missed. Email requests to me for summaries of material presented in class will not be answered.

    Assignments
    1. Write a program to calculate the area of a circle. The program will read in the radius and write out the area calculated. (the area is radius times radius times 3.1415). Due: Friday Sept 11.

    2. Write a class for a Circle object following the example for the Gradebook given in the book.

      A circle is defined by three pieces of data: x and y coordinates of the center and radius. These should be double private variables.

      The functions of Circle will be:

      1. a constructor which receive the x, y and radius in that order.

      2. a Show() function that prints the x, y and radius and the area of the circle.

      The program should be written as 3 files as the book shows for Gradebook. Write a main() progarm that creates three Circle objects (and initializes them) and then displays their contents (similar to the example in the book).

      Due: Mon Sept 28

    3. Do Exercise 6.35 on page 326 (computers in education). Due: Mon Oct 26

    4. Do-It-Yourself Lottery. Basically, determine what the chance is of winning a Powerball style lottery. To do this, generate a "winning" ticket then see how many time it takes to draw the same tickey.

      Write a program to generate 6 random numbers in the range of 1 to 50. Store these in an array named 'win'. In a loop, generate sets of 6 random numbers and store in another array. Compare the contents of this array against the 'win' array. Quit when they match. Count the number of times it takes to win. Repeat the whole process 10 times and average the counts. Due: Fri Nov 13.

    Software If you have a Microsoft based desktop or laptop and you want to use it for assignments, you should install the free Sun VirtualBox and Ubuntu (Linux). This will be shown in class. Alternatively, you can set up a dual boot for Linux. A demo will be given. If you have an Apple, you should check to see that the C/C++ development packages are installed.

    If you do not have or wish to use your own computer, accounts on a Linux server will be available.

    The book comes with a CD with the Microsoft Visual C++ compiler. Instruction will assume you are using the Linux/Apple based version of C/C++. Ignore the MS C++ compiler. I will not provide support for the MS C++ compiler.

    Note: basic BSD(Apple)/Linux commands will be covered in class.

    Topics:
  • Overview of C/C++ programming languages
  • Overview of compilers and editors available.
  • Basic statements and sample programs
  • Numbers and arithmetic operators
  • Characters and character operations
  • Operators and operator precedence
  • Compound statements, multi-way decisions, jump statements
  • Arrays
  • Storage types
  • Pointers and arrays
  • Strings
  • Constructed types: structures and dynamic allocation
  • Objects
  • Classes
  • Vectors and matrices
  • File systems
  • Data structures
  • Inheritance and polymorphism
  • Multi-dimensional arrays
  • Library Functions

  • Cygwin for Windows http://www.cygwin.com/
    Installation Notes for Windows
    vi Editor Introduction to display editing with VI
    VI lovers home page
    Mastering the VI editor
    The VI/EX editor
    VI Tutorial

    The following notice is required by the University:

    "The Americans with Disabilities Act of 1990 (ADA) provides protection from illegal discrimination for qualified individuals with disabilities. Students requesting instructional accommodations due to disabilities must arrange for such accommodation through the Office of Disability Services. The ODS is located at: 103 Student Health Center, and the phone number is: 273-2676."

    Because the Office of Disability Services has procedures in place to determine the validity of disability claims as well as the need for instructional accommodations, faculty are reminded that they are to direct all students with accommodation requests to the above listed office.

    UNDER NO CIRCUMSTANCE SHOULD A FACULTY MEMBER MAKE AN ACCOMMODATION INDEPENDENT OF THE OFFICE OF DISABILITY SERVICES.

    Questions may be directed to: Disability Services Coordinator, at 273-2676 or to this office at 273-2846.

    Kevin C. O'Kane / Computer Science Department / UNI / okane@cs.uni.edu

    Access count: