計算機程式(二)

Spring 2004
Prof. Yukon Chang

Sample programs from [Deitel & Deitel]

The following is a list of announcements, handouts and programs to be covered in the course.

Date

Article/Link

Description

6/19/2004

Account closed

Now that the semester is over, all student accounts are disabled. Have a nice summer break!

6/19/2004

Final Grades

I have posted the final grades for this course outside the department office.

6/10/2004

Special Help Session

I will be in my office (3509-1) the night before the final exam from 7:30 to 9:00 to hold a special help session for the midterm exam. You can also come and ask questions earlier if you want.

6/10/2004

Final Exam

The final exam will be held in class on June 18. A sample final exam can be found here.

6/10/2004

Templates

In the last week of the class, we will finish discussion of linked list and make a brief introduction to template class. Please download and print out the following files for Friday’s class. [template.ppt, tmplSLLst.h, tmplmain.cpp, time3.h, time3.cpp]

6/1/2004

Preview of Data Structures

As I promised in class, I’ll give a brief review to data structures in the remaining of this course. The slides and programs to be discussed this Friday can be found here. [1, 2, 3, 4]

5/22/2004

Sample programs from the textbook

I’ve created a subdirectory to keep most of the sample programs in the textbook. You can follow this link to download them. Remember to use the debugger to trace 3-level hierarchy point-circle-cylinder example.

5/21/2004

Assignment 6

Do Problem 7.9 on p. 545 as the sixth programming assignment. This assignment is due midnight, June 1.

5/16/2004

Special Help Session

I will be in my office (3509-1) Thursday night from 7:30 to 9:00 to hold a special help session for the midterm exam. You can also come and ask questions earlier if you want.

5/16/2004

Midterm Exam 2

Midterm exam 2 will be held in class on May 21. A sample midterm exam can be found here.

4/30/2004

Assignment 5

Do Problem 6.7 on p. 466 as the fifth programming assignment. You will need to solve the greatest common divisor problem when you try to reduce fractions. See Problem 3.45 on p. 248 for a recursive GCD algorithm. This assignment is due midnight, May 10.

Seek help if you need it.

4/16/2004

上機考卷

A

B

4/13/2004

Special Help Session

I will be in my office (3509-1) Thursday night from 7:30 to 9:00 to hold a special help session for the midterm exam. Bring your questions and I’ll help you answer them.

4/2/2004

Solution to Assignment 2

Solution to Assignment 2 can be found here. Study it well because some problems on the sample midterm exam makes use of it.

4/2/2004

Midterm Exam 1

The date of midterm exam 1 is delayed to April 16 because of the unexpected day off on April 9. A sample midterm exam can be found here.

3/25/2004

Extra point assignment 4x

From time to time, I’ll assign extra point problems for those of you who are looking for more challenging programming tasks. Please do Problem 4.32 as extra point assignment 4x. The due day is also midnight, April 5.

3/25/2004

Assignment 4

Do Problem 4.11 as your fourth programming assignment. It is due midnight, April 5. Don’t forget to use wincvs while writing the assignment.

3/25/2004

Midterm Exam 1

The first midterm exam will be held on April 9. It covers Chapters 1-5 of the textbook as well as the programming tools we discussed in class. There will be a written part and a lab part of the exam. A sample test will be posted next week to help you prepare for the exam. You should also study the following practice problems:

l      Chapter 2: 1-13, 26*, 27*, 28, 37*, 55

l      Chapter 3: 1-10, 16, 17, 30*

l      Chapter 4: 1-5, 8, 15*, 17*, 29*

l      Chapter 5: 1-7, 9, 33*, 36*, 39*, 40*, 41*

Problems marked with an asterisk are slightly more difficult than the unmarked ones.

3/18/2004

Assignment 3

Do Problem 3.29 as your third programming assignment. It is due midnight, March 29. Don’t forget to use wincvs while writing the assignment.

3/18/2004

Assignment turn-in procedure

All assignments starting from the third one should be turned in using wincvs. Your TA (teaching assistant) 王正浩has written a document describing how to setup and use wincvs. Click here to view the document. As described in class, you should periodically check in your program, even if it is incomplete, every 15-20 minutes to leave a trace of your work on the server.

3/11/2004

All Slides

Here you can find all slides for this book provided by the publisher.

3/4/2004

Chapter 2 Slides

Chapter 3 Slides

These chapters give relatively straightforward review of control structures and functions in C.

2/27/2004

Assignment 1

Write a C/C++ program that reads in an integer n and print out n!, the factorial of n. This problem can be done either iteratively or recursively. If you can, write both versions. You should bring in your program to the lab quiz.

Write the program yourself. Do Not Cheat!

2/27/2004

Lab Quiz

I would like to arrange a hands-on lab quiz next week to see how familiar you are with programming tools. Exact time and place will be discussed in class today.

2/26/2004

Chapter 1 Slides

These slides are provided by the publisher of the Deitel & Deitel textbook. Slides to be covered in class are marked with a star symbol. You can download the complete version here or the condensed version that contains only selected slides here.

2/26/2004

getopt_manpage.pdf

This manual page explains how to call the getopt() function.

2/20/2004

main.c

getopt.c

getopt.h

Download these files and add them to a Win32 console application in Visual C++ 6.0. Compile and experiment with this program. We will discuss this program in more detail later.

2/20/2004

C-review.doc

This is a Word file that we will use in the first few weeks while reviewing the C language. Please download this file, quickly go through it, and mark anything that you don’t understand.

2/20/2004

syllabus

This is the syllabus for this course