CS 112 Structure of Programming Languages
CS 280 Programming Languages and Paradigms
1st Semester, 2009-2010
John Paul Vergara, PhD
Pablo Manalastas, PhD
Syllabus
Moodle
Announcements
- Release of your class standing will be delayed.
It should be posted in moodle before 10am, Thursday (October 15) morning.
I will be available for consultation on Thursday afternoon.
- Midterm exam on August 29.
Coverage: Imperative and Functional Programming.
There will be written and handson portions.
- July 11
and 18 through August 8:
Classes to be handled by Dr. Pablo Manalastas.
- July 4: Take home Lab 3 due July 11.
- Reading Assignment #1
(Image scans from Stroustrup text, 2nd ed, p. 14-22).
Make sure you have read this section by next meeting, June 27.
- Welcome to this webpage!
Consult this page regularly for updates and course material.
Slides
Labs
- Lab 1 (June 20): Writing a simple module in C.
Write a C program that computes the mean (average) of a bunch of scores.
Arrange it so that a separate module facilitates the computation;
the module should have an addscore function and
a computemean function.
Test your module by creating a separate source file
with a function that uses the functions of the module.
- Lab 2 (June 27): Modular programming continued.
Improve the module you created last week: add a function called
computestdev that computes the standard deviation
of the scores added so far.
Standard deviation is defined as the squareroot
of the average of the squares of differences of
each score from the mean.
Include a separate tester program that
calls all of the functions in your module: addscore, computemean,
and computestdev.
(Submit a zip file (Lab2-Lastname.zip) thru
Moodle
by 10am today)
- Lab 3 (Given July 4, due July 11 noon)
- Lab 4 (August 15):
Lab work for 9-930am:
You may work in pairs.
Write your answers on a sheet of paper and submit to your instructor
by the end of the period today.
-
Download arrays.c
and compile under Dev C++.
Update the program so that MAX is 20 instead of 10
and observe what is printed out.
Change SIZE to 10 instead of 12 and
observe what is printed out.
Provide a brief explanation
on why those numbers were printed out in both cases
-
Download and compile mem.c
and explain its resulting output.
(describe which pointers point where; you may illustrate through a diagram).
- Lab 5 (August 22):
(these will serve as sample tasks for your midterm exam)
C Lab (to be submitted via moodle):
Write string functions pad, truncate, and concat
with signatures indicated in this
strmisc.h file .
The following tester.c
program uses these functions with the following
resulting output.
Haskell Lab (need not be submitted):
click here
- Lab/Seatwork 6 (September 5,9-9:30am):
You may discuss in pairs.
Download, compile, and execute:
Identify the peculiarities in the outputs of these programs,
and attempt to explain why they are as such.
Describe and submit your findings and insights in a sheet of paper.
- Lab 7: Write a C++ dataset class
for this program
Projects