http://www.eng.uwaterloo.ca/~sd121/sydelogo.gif

 

SD 121: Digital Computation

 

 

http://www.eng.uwaterloo.ca/~sd121/ruler.gif

FINAL EXAM OFFICE HOURS

Final exam office hours will be held in E5 6003/6004 at 1-3pm on Dec 20th.  TAs will be available to answer one-on-one questions.

 

.

*** FINAL EXAM RULES - please read carefully ***

During the final exam, you may be tempted to take out the staple holding your exam book together so that you can see multiple pages at the same time.  This is ok, however, you must follow these rules:

a) no more than two (2) pages face up in front of you.  Other pages must be face down or covered up.

b) you must bring your own stapler to put your exam booklet back together.

c) your exam booklet must be put back together with ALL pages in the PROPER order.  This is important since it takes a long time to grade the exam and if the pages are not in the proper order or are missing, it takes even longer to sort out.  Failure to adhere to this rule (c) will lead to a grade reduction of 20% on your final exam (i.e., if you had 80% on the final exam, your grade will be reduced to 60%).

 

Good Luck On Your Final Exam!

 

DETAILED COURSE OUTLINE

This outline details the material covered in SD121.  It may not be exact re: section numbers, but the content is complete.  This is a helpful guide for studying because you should be able to determine the areas where you need to spend more time studying.

LABS

Lab 1 - Introduction (no grades assigned)

 

Lab 2

EnterData.cpp

 

Lab 3

runtime_errors.cpp

Common Programming Errors - Tips from Lab #3

 

Lab 4

 

Lab 5

 

Lab 6 - Functions (note: submit 3 of 4 exercises).   

 

Lab 7 - projects (multiple file compiling), arrays.  output_to_file.cpp

 

Lab 8 - arrays, streams, and functions.

 

Lab 9 - Introduction to Class Design and Implementation.  It helps to have the upcoming Monday lecture completed before starting this lab.

driver.cpp      UseDate.cpp  Date.cpp     Date.h

 

Lab 10 - Advanced Classes (operator overloading, inheritance, dynamic class memory)

Due: Monday Dec 5 9am (two lab sessions)

Rational_driver_lab10.cpp

University.zip

Array.zip

LECTURES

Preamble (material for September 14 lecture)

Section 1 - Introduction (material for September 16 lecture)

Section 2 - Basics (material for September 21 and September 23 lectures)

Section 6 - Handout on structs.

Section 10 - Handout on class inheritance (University)

 

EXAMPLE CODE

marks2.cpp (Section 2 – C++ Basics)

marks3.cpp (Section 3 – Decision Making)

marks4.cpp (Section 4 – Iterations)

marks5.cpp (Section 5 - Functions): note the short main function.  The other functions do most of the work.

sort.cpp (Section 7 - Arrays).  Working example of insertion sort as discussed in class. Shows how to create arrays and pass arrays into functions ('simulated pass-by-ref').

arraysandstructs.cpp (Section 7 - Arrays).  Shows how to combine arrays and structs together to create a more compact method to store data.

multiarray.cpp (Section 7 - Arrays) Shows how to setup and use multidimensional arrays.

filestreams.cpp (Section 8 - Filestreams) Shows how to open, use, pass into functions, and close filestreams.

Counter Class (Section 9): counter.zip  (includes counter.cpp, main.cpp, counter.h, input.txt)

Rectangle Class (Section 9): rectangle.cpp    rectangle.h     main_rectangle.cpp

Tic-Tac-Toe (end of course) tic-tac-toe.ppt

 

MIDTERM

Midterm exam was returned at the end of class on Nov 3.  Solutions are here.  Recommendation: if you received <= 12 on Q#3, do the problem on your own and then take a look at the solutions.

Key Point from Midterm: create functions that do a task, and then call that function multiple times when needed (good!).  Don't create a function that does the same task multiple times (bad!).

 

TUTORIALS

Hamming – Learning How to Learn

Testimonial Thank You ...

 

TA EMAIL ADDRESSES

 

Robert Amelard   ramelard@uwaterloo.ca

Namrata Bandekar   nbandekar@uwaterloo.ca

Betty Chang   y6chang@uwaterloo.ca

Joseph Shum   jshum@uwaterloo.ca

Yan Wu    yan.wu@uwaterloo.ca

 

 

 

COURSE OUTLINE – course_outline.pdf

 

PRACTICE MIDTERM

This is the midterm exam for SD121 that I prepared for Fall 2007 (note: printed on legal sized paper).  My strong recommendation is that you give the exam a try only after Lab #6 is completed and only after you have had a chance to review the course material.  Then, try the exam using no other aids to simulate taking real midterm exam.  Enjoy!

 

Multiple choice solutions: b, b, e, d, c, a, c, c, a, a

Question 4 circle.cpp secant.cpp

 

Suggested Cover Page Template (for all SD lab submissions)

SD121 - STYLE GUIDE

 

http://www.eng.uwaterloo.ca/~sd121/ruler.gif

http://www.eng.uwaterloo.ca/~sd121/top.gif

Please send your comments to Prof. D. Clausi . This document will be updated on an ongoing basis during Fall, 2010.