Deborah R. Fowler


Resources for ITGM 315 C++ Programming I

Updated on May14, 10:29PM 2012.

AS A COURTESY TO YOUR FELLOW STUDENTS PLEASE SELECT RESTART WHEN LEAVING A WINDOWS SESSION. This will restart in Linux and allows the renderfarm to use these nodes when they are idle. Thank you.

Please review these notes regularly during the course of this quarter. Assignments are available online only.
Red font is used for assignment due dates.
Blue font indicates a link - please click on it.

If you find that any of the links below have died or been relocated, please let me know.


Link to C++ Information page here

Textbook and Examples:

This textbook details can be found at the above link. It is a reference and will not be followed in strict Chapter order. Please refer to the class syllabus or textbook reading list for the Third Edition here (or the Second Edition here.)


Note that there will be additional examples placed in the _MATERIALS folder of the dropbox and will be referred to in class and/or in these notes (a brief description of each zip file exists in the readme.docx).

Tutoring is available: Our tutor this quarter is TBA. Please see my home page for more information.


Guidelines and Rules - click here


Due Dates

Overview of Exercise deadlines (class numbers):

Weight


Deadlines
 5
Ex 0
out 1
due 3
 5
Ex 1
out 3
due 5
10
Ex 2
out 5
due 7 now 8 (due to vsfx day)
10
Ex 3
out 7
due 9 now 10
10
Ex 4
out 9
due 11  now 12 (algorithm due 10 now 11)
10
Ex 5
out 11
due 13 now 14
20
Ex 6
out 13
due 16 now 17
10
Ex 7
out 16
due 19 now 20
15
Quizzes
(each 3%)

5
Midterm

during Class 9 or 10

Optional Exercise 1-2-3-Knockout is available class 9 and is not due until Class 12 - this is entirely optional as discussed in class. If you have not submitted any work for 1-2-3 you are not allowed this option.

Please note: Exercises are in increasing levels of challenge - be sure to start early. Exercise 6 and 7 are more like projects.

Grades will be posted on blackboard with specific feedback handed back in class or in the dropbox before the next Exercise due date. There is a grading explanation on each individual exercise handout. A general guideline rubric is here, however each exercise has specific requirements listed.

Due dates are also listed on the calendar.

Link to class syllabus.



Class 1     

Introduction to Programming using Scratch as a stepping stone to C++ Programming. Pretest and review of syllabus.

Play with Scratch!

Exercise 0 is assigned and due at the start of Class 3. You may be presenting your work.

Class 2      

Brief introduction to Flow Control, including loops and if/then constructs in Scratch.

Work on your Scratch project.

Read Chapters 1 & 2.

Class 3   

Exercise 0 (Scratch) is due today at the start of class. You may be showing your work in class.

Jumping into C++
The concepts you have learned in Scratch now seen in C++ 


Finish reading Chapters 1 & 2 and for practice (not to be handed in)  from textbook p. 38 #2, 3. (page 34 if using second edition). Practice using the IDE.

Please make sure you can zip and unzip files properly. If you have questions, please ask.
The example mentioned in class was _MATERIAL/C3-Variables/ITGM315-Variables.zip. Feel free to create your own as well. This is just to get you started.


We covered all the material that is required to complete Exercise 1.


Exercise 1 assigned.


Class 4    

Quiz 1 - Introduction.

Flow Control.

Read Chapter 3 (except pages 87-96)

Reminder: Review the "textbook reading list", "best practices" and "coding standard guidelines".

In addition, we will cover debugging in general and in the IDE. Two of the most helpful buttons are F10 - to step through a program and F9 to set or remove a breakpoint. You may also use ctrl F5 keys together so that the console window stays open, however this is just a hot key to run the program without debugging. If you run it for testing (hot key F5) it will still close the console window too soon. When handing your assignment in, please use the methods discussed in class to leave the console window open. Exercise 1 is due Class 5.

C4-IntroExamplesStart provide some good examples to work with the material covered.

Class 5  

Arrays and Vectors - Lists

Exercise 1 (C++ Intro) is due today at the start of class. Exercise 2  assigned.

Read Chapter 5.

Materials folder C5-6-IntroExamples correspond to the material covered in the next two lectures.

Class 6     

Vectors, Debugging, Examples and Practice. In class assignment - list exercise.
.
Quiz 2 - Flow Control.

Class 7 

Vectors  

Exercise 2 (Flow Control) is due next class at the start of class. Exercise 3 assigned.

There are three examples in the _MATERIAL/E3-FunctionExamples folder. These examples will be useful for Exercise 3, Exercise 4 and for your future Quiz. Please take a look at them - they are described in the handout for
Exercise 3 as well as the readme. These are zip files, so don't forget to extract them

Class 8 

Functions.

Data Structures and more: Arrays reviewed, structs, introduction to Classes, STL vectors and iterators.

Please pay attention to the comments you receive when I hand back your grades - since Exercise 3 is an exercise in modifying existing code you want to address any problems you had with Exercise 2.

Class 9 

Functions and Data Structures overview.

Exercise 3 (Functions) is due next class at the start of class. Exercise 4 assigned.

Midterm Quiz - Open book.

Your midterm grades will be calculated in the following manner: Exercise 0,1 (10% each), 2,3 total (25% each), quizzes 1,2 (10% each), and midterm(1) 10%

Please note that final grade calculations will be computed as per the syllabus outline: Exercises (8 of varying weights) 80%, quizzes (5) 15%, midterm (1) 5%

Read Chapter 7 (especially first section) & Chapter 6.

Class 10 

Data Structures and Introduction to Classes and OOP  

Exercise 4 algorithm (hardcopy) is due next class in class.

Several additional examples exist in the _MATERIAL folder from the lecture material. These examples will be useful for you to use as a starting point to understanding (or as syntax reference to) vectors, pointers, structs, classes. These are zip files, so don't forget to extract them. Copy them to your own directory and use them as a starting point to experiment with. They are:

C5-6-IntroExamples/ITGM315-ExamplePointers.zip,
C5-6-IntroExamples/ITGM315-ExampleVectors.zip,

C7-8-StructExamples/ITGM315-ExampleStruct.zip,
C7-8-StructExamples/ITGM315-AnotherStruct.zip,

C7-8-StructExamples/ITGM315-StructVsClass.zip

E5-SwapExample/ITGM315-ExampleSwapValues.zip.

Read Chapter 8, Chapter 3 (section on Objects)

Class 11 

Pointers and References: Introduction.
OOP - Object Oriented Programming: Concepts.

Exercise 4 (Arrays,Strings,Game Loop - Dice Game)  is due next class at the start of class. Exercise 5 assigned.

Read Chapter 8 again.

Class 12 

Exercise 5 is due next class. Today you should have at the minimum data structures ready in your code for my review (I will be visiting your workstation today in class).  Many of you may have completed this assignment already.  

Quiz 3 - Functions.

A reminder that there are many examples in the _MATERIALS folder with a readme.doc file indicating what subject/class they are related to - these do not substitute for notes you should be taking in class or the required textbook reading. They do however relate directly to the material covered in class as well as hints for your assignments. Please take advantage of this resource and as always, if you have questions come and see me or send me email.

OOP - Object Oriented Programming: Access Levels, Data Access, Member Functions

Read Chapter 10 (to page 347).

A reminder to start an Exercise as soon as it is assigned, and use the examples in the _MATERIAL folder to supplement your learning.

Class 13

Exercise 5 (Card Game)  is due next class at the start of class.  Exercise 6 assigned.

OOP - Object Oriented Programming: Inheritance.
Read Chapter 10 (page 347 to end).

Class 14      

Quiz 4 - Vectors, Structs

OOP - Object Oriented Programming: Inheritance.

A number of examples exist in the materials folder related to the material we are covering in class. These are in a folder called OOPExamples/Class14.
They are as follows:
ITGM315-ExampleClassRectangle.zip
ITGM315-RectangleFriend.zip
ITGM315-RectanglePointers.zip

The three files above are the ones that we will cover in class, and two are solutions to the inclass exercise: try taking the friend version (first one listed here) and making it a member function instead (second). The third uses pointers.

As well as OOPExamples/Class14:
ITGM315-ExampleClassFriendSplit.zip (rectangle/square using a friend class rather than a friend function)

ITGM315-ExampleClassDerivedConstructors.zip (mother-son-daugher example of constructors)

Also important are:
Class13/ITGM315-ClassInheritanceAccess.zip (this one is useful even if you are not using virtual functions as a general example of function syntax - enemy boss example)
Class15/ITGM315-ExampleDerivedClasses.zip (polygon/rectangle/triangle example)


Please note that these examples were covered in class and are meant as a guide. You should understand the material that they cover. Please look them over and ask any questions you may have.

We've gone over how to split your program into multiple .cpp (C++ file) and .h (Header File). Right click on the Source Files label, then select add item and add a cpp file and then analogously a .h file named with the name of your class you are defining. See the examples in the dropbox for details.

Class 15       

Remember to look at the examples in the materials folder.

Review of Classes/OpenGL - Introduction

Class 16       

OpenGL - More Details

Exercise 6 (Classes - RPG)  is due today at the start of next class.  Exercise 7 assigned.

Read Chapter 4.

Class 17       

Advanced Topics: OOP - Libraries

Class 18       

Quiz 5 - Classes and other topics

OpenGL, Code Review and presentations
Code Review

Class 19       

Presentations

Class 20       

Exercise 7 due today.
Presentations

Posttest.



Thank you to Professor Kenneth Huff for his generous help in setting up this page.