ITT - IT217
Programming in C++ II
December 2008
Notes and Assignments:
- Week 1 - Tuesday, December 2, 2008
- Welcome to the first day of class.
- We'll do introductions, pass out the syllabus, take a quick assesment quiz (0 points), review some basic programming topics, pick teams for group project and then start on the course material.
- Unit 1 - Detailed Study of Classes
- Unit 1 - Homework Assignment
- Class Project
- Unit 1 - Lab
- Review Links:
- C++
- Control Statements
- hello world program
- if/then
- input/output
- Loops
- switch
- New Topic Links (for further understanding):
- Abstract data type
- Class
- Class Diagram
- Dynamic memory allocation
- Friend Class
- Pointers
- Prototype-based Programming
- Proxy Pattern
- Scope Resolution Operator
- Standard Template Library
- Unified Modeling Language (UML)
- Vector (STL)
- Other Resources:
- C++ Reference
- Download Visual C++ Express
- Google: "C++ tutorial"
- Google: “Visual C++ Tutorial”
- ITT Virtual Library
- Visual C++ Developer Center
- Youtube: "C++ tutorial"
- Youtube: “Visual C++ Tutorial”
- C++ Class Tutorial
- C++ Pointer Tutorial
Week 2 - Tuesday, December 9, 2008
We'll start with a short quiz to review topics from last week. We'll then cover the course material, work on the lab and homework. If time permits we'll start on the term project and work on tutorials online.
Unit 2 - Operator Overloading
Unit 2 - Homework Assignment
Unit 2 - Lab
Wiki links
Operator Overloading
Operators and Operator Overloading
Polymorphism
Polymorphism - Link 2
Templates
Objects
Standard Librrary
Copy Constructor
Unary Operation
Binary Operation
Increment / Decrement
Other Useful Links
C++ Tutorial - Operator Overloading
Subroutine
C++ Standard Library Reference
We'll start with another quiz next week to review topics covered up to this point.
Week 3 - Tuesday, December 16, 2008
In order to save on wasted papger, students will print their own Lab and Homework Assignments in class, I will provide the hard copies of the quizes.
Parts 1 and 2 of the course project are due at the beginning of class.
Homework 2 is due at the beginning of class.
After collecting the course project work and homework, we'll start with a quiz to review the topics we've learned thus far.
Unit 3 - Polymorphism in OOP
Unit 3 - Homework Assignment
Unit 3 - Lab
Links for further understanding
Abstract Data Type
Base Class/Superclass
Data Type
Derived Class/Subclass
Inheritance
Polymorphism
size_t
Vector (STL)
Virtual Function
Having issues with the course so far? Have you tried going through the following tutorials?
C++ Class Tutorial
C++ Pointer Tutorial
The following are additional problems/tutorials I gave to my IT116 students, try doing them in C++ and see how far you can get before the end of class.
You can turn in as much as you get done at the beginning of next class for extra credit.
- Write code that sums all integers from 1 to 1000
- Write code that sums all even integers from 100 to 2000
- Write code that will sum all integers between two user inputted integers
- Write code that outputs the first 100 prime numbers
- Write code that initializes some basic data and then casting between the following datatypes: Byte, Double, Integer, Long, Single, and String.
- What has higher precidence, a variable name that is more global or more local to a loop? Write some code that proves your answer.
- Use google to find 5 useful webpages that can help you through out your future vb.net (visual C++ for this course) programming career (single tutorials do not work, a successful reference would be something like: http://www.devguru.com/Technologies/vbscript/quickref/vbscript_list.html for VB).
- Do the following tutorials from "Hello World" through "Noughts and Crosses" VB Tutorials (See if you can do any of these in Visual C++, note some will be easy and some will be hard)
Extra Credit Assignment - Inheritance/Polymorphism
Create a simple C++ program (one cpp file) that has several classes in it. The classes should be simple (such as containing a few variables/attributes/methods). Demonstrate class constutors, copy constructors, inheritance from a base class (both direct and indirect), single inheritance and multiple inheritance. Do an example of a virtual function. Also demonstrate polymorphism. The more you show me you know and learned the more extra credit you'll get.
Document all code so that it is clear and easy to understand. See my C++ Example Constructor file I created (Note: You'll also want to look at the wikipedia links I linked to earlier). You can start with this and modify it to do everything else that is required for this extra credit.
Saturday, December 20th
A couple of people have asked me about "game programming." To help those who are interested, I did a little research on my own to try to help give a edge to those who are interested in learning.
First of all, you can program a game in many different languages, the first question you should ask yourself is, "What kind of game do I want to program?" Once you answer this question, then you'll have a better idea of the platform you wish to use to develop it.
Simple games can be programmed to run as command line games, such as running through DOS. Now if you want your game to be more exciting (and to advance beyond the 70s/80s), then you'll probably want to add some graphs in up the user interactivity. So now you have a couple different options.
If you are programming for a internet game to be viewed through a browser then you'll want to think about either using Flash with Active Scripting or perhaps a Java Applet.
If you are looking to do something like a windows based program/Xbox program then you might want to consider the following:
Download and install C# 2005 Express
Next, download and install C# Service Pack 1, make sure you read the descriptions so you download the right one...
Next, download and install XNA Game Studio Express 1.0, used for creating games on Windows Based PCs and Xbox 360 console
The next major step is going through some of XNA tutorials
Last, when you make lots of money... remember me... :)
Week 4 - Tuesday, January 6th, 2009
Part 3 of the course project is due at the beginning of class.
To help students get back into the swing of things, there will be no quiz today. We will continue with weekly quizes next week.
Unit 4 - Templates and Other Advanced Topices
Unit 4 - Lab
Unit 4 - Homework Assignment
Please read through the following links prior to doing the lab, it'll help you:
C++ Template Tutorial
C++ Template Tutorial 2
C++ Polymorphism
C++ Namespaces
C++ Exceptions
C++ Type Casting
C++ Preprocessor Directives
Week 5 - Tuesday, January 13th, 2009
We used last week to play catch up. This week we will start with a quiz, covering topics through week 3. We will then go over the material for weeks 4 and 5. Project parts for week 4 and 5 will be due at the beginning of next week. Homework for weeks 4 and 5 will be due at the beginning of next week. Both labs for week 4 and 5 will also be due at the beginning of next week.
All homework and labs through week 3 are due at the beginning of class today.
Unit 4 - Templates and Other Advanced Topices
Unit 5 - File Processing
Unit 4 - Lab
Unit 5 - Lab
Unit 4 - Homework Assignment
Unit 5 - Homework Assignment
Review the links under week 4 for further understanding of week 4 material.
Review the following links for further understanding of week 5 material:
C++ Input and Output with Files
C++ File IO
Practice your file reading and writing skills with the following easy task (this is due by the end of class):
1) Open a files and write the numbers 1 through 100 separated by spaces. Save that file and close your connection.
2) Open the file you wrote to and read each number and add it to a running total. Output this total to the screen. If you get 5050, your program worked properly.
Reminder, the Midterm is next week.
Week 6 - Tuesday, January 20th, 2009
Part 4 and 5 of the course project is due at the beginning of class.
We will not have homework this week, to allow everyone to catch up on any missing assignments.
Unit 6 - Class string and String Stream Processing - ITT Lab for reference only.
Unit 6 - Lab - ITT Lab for reference only.
The lab for credit will be given during class.
Mid Term has been pushed back to next week as discussed last class.
Today we'll continue to review topics from the previous classes. We will also go over basic string initialization and functions associated with strings. We'll reverse strings, copy strings, work on getting strings from input, etc. All homeworks through Week 6 are due next week.
C++ String
String Length
String Size
String Copy
String Substring
String Compare
Week 7 - Tuesday, January 27th, 2009
All makeup work homework, assignment, labs, etc are do by the beginning of class. Any late assignments will receive 0 points.
Midterm Today.
Unit 7 - Searching, Sorting, and Data Structures - Read on your own
Unit 7 - Lab - Read on your own
The class lab will be given during class.
Unit 7 - Homework Assignment
Topics Covered Today:
Big O notation for analyzing efficiency
Linear search
Binary search
Selection sort
Insertion sort
Merge sort
Dynamic memory allocation
Linked lists
Stacks
Queues
Trees
Week 8 - Tuesday February 3rd, 2009
Part 7 of the course project is due at the beginning of class.
Unit 8 - Bits, Characters, C-Strings and structs - Read on your own
Unit 8 - Lab - Read on your own
Unit 8 - Homework Assignment
Topics Covered Today:
C++ Bitwise and Shift Operators
C++ Struct
C++ typedef
C++ Pointers and Dynamic Allocation
C++ Dynamic Allocation of Memory for Stack
Week 9 - Tuesday, February 10th, 2009
Part 8 of the course project is due at the beginning of class.
Unit 9 - Standard Template Library - Read on your own
Unit 9 - Lab - Read on your own
Today we'll talk about palindromes and other concepts. Today we'll focus on programming various small programs to further our understanding of C++ and object oriented programming.
Week 10 - Tuesday, February 17th, 2009
Part 9 of the course project is due at the beginning of class.
Unit 10 - Web Programming - Read on your own
Unit 10 - Lab - Read on your own
Topics of Focus:
ADO Tutorial
ASP Reference
ASP Tutorial
ASP.NET Tutorial
Connection Strings for Databases
CSS Tutorial
HTML Tutorial
JavaScript Reference
JavaScript Tutorial
JSP Tutorial
JSP Tutorial 2
PHP Tutorial
SQL Tutorial
VBScript Reference
XML Tutorial
More Topics:
ActivePERL download
CGI Tutorial
CGI Tutorial 2
PERL Tutorial
PERL Tutorial 2
W3Schools Online Certification Program
Other Topics for fun (related and unrelated):
AJAX
C#
Delphi
PHP
Python
Scripting Languages
VB.NET
Week 11 - Tuesday,
Part 10 of the course project is due at the beginning of class.
Final Exam Today.
Power Points:
Unit 1 - Detailed Study of Classes
Unit 2 - Operator Overloading
Unit 3 - Polymorphism in OOP
Unit 4 - Templates and Other Advanced Topices
Unit 5 - File Processing
Unit 6 - Class string and String Stream Processing
Unit 7 - Searching, Sorting, and Data Structures
Unit 8 - Bits, Characters, C-Strings and structs
Unit 9 - Standard Template Library
Unit 10 - Web Programming