CSC270 Survey of Programming Languages In Class

C++ Programming Exercises

Demonstrates Exercise? wget location
Pass by Reference Y wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/squareForRef.cpp
Strings   wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/Palindrome.cpp
Guy version of Class with Ex Y

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample1/guy1.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample1/guy1Ex.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample1/guy1ExAns.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample1/guy1WithConstructor.cpp

Guy version of Class Separate Implementation of h/cpp with makefile  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample2/guy2.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample2/guy2.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample2/guy2app.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample2/Makefile

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/guySample2/MakefileBetter

Operator Overload  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/Complex/Makefile

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/Complex/Complex.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/Complex/Complex.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/Complex/ComplexDemo.cpp

Inheritance in one file tutorial with example http://www.cplusplus.com/doc/tutorial/polymorphism/
Inheritance broken into h/cpp  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/Payroll.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/Employee.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/HourlyEmployee.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/SalariedEmployee.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/Employee.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/HourlyEmployee.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/SalariedEmployee.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/inherit/Payroll.makefile

 

Class of dynamic arrays  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/dynarray/DynArray.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/dynarray/DynArray.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/dynarray/DynArray.makefile

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/dynarray/DynArrayDemo.cpp

using string replace  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/stringsubstituter.cpp

File i/o   wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/FindLength.cpp
wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/ChangeFile.cpp
Exceptions   wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/ExceptionDemo.cpp

 

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/

OLD but matching some powerpoints.

Separate Implementation

of H

MakeFile

 

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/AverageWithH.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/AverageWithH.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/MakeAverageWithH

Class  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age10.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age10ex.cpp

Class Creation broken into h/cpp  

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age13save/age12app.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age13save/age12ex.cpp

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age13save/age12ex.h

wget http://home.adelphi.edu/~pe16132/csc270/note/SampleCode/cplus/age13save/makeFileage12

 

Exercise we are not using this semester: