PR611: Programming in C++ (14 credits)

Menu 1:

(This web site:) (Homepage:)
Index

(Pages on
this web site:)

Home Page

About Me

Links

Catalog of notes


(My lecture
notes on
this web site:)

JavaScript

PR515 (JavaScript
cs/ss scripting)

PR655 (JavaScript
cs/ss advanced)

CS/SS scripting

Java Applets

SE5120 (C)

PP (C++)

OO (C++)

PR611 (C++)

Delphi (OO)


(Program samples:)

2002 Search engines

1999-2003 Calculators


(My computer
research
on this web site:)

Computing

Search Engine


Menu 2:

(Other web sites about:)


(Seismograph:)

alarm.gq.nu

alert.1hwy.com

capsule.20m.com

magnocraft.20fr.com

totalizm.fanspace.com

jp.7h.com


(Magnocraft:)

magnocraft.20fr.com

capsule.20m.com

jp.7h.com

totalizm.fanspace.com

alarm.gq.nu

alert.1hwy.com


(Oscillatory Chamber:)

capsule.20m.com

magnocraft.20fr.com

jp.7h.com

totalizm.fanspace.com

alarm.gq.nu

alert.1hwy.com


(Totalizm:)

totalizm.fanspace.com

jp.7h.com

magnocraft.20fr.com

capsule.20m.com

alarm.gq.nu

alert.1hwy.com


(Computing:)

(Web sites with my lecturing notes - from 2004 till 2005:)

pajak.orcon.net.nz

pajak.ownsthis.com

free.7host03.com/Pajak


(Web sites with
my old lecturing notes - from 1999
till 2003:)

Pajak.20m.com

Pajak.20fr.com


(My web site on
web tutorials:)

Websitemaker.20m.com


(All-in-one
prototypes:)

totalizm.fanspace.com

jp.7h.com

magnocraft.20fr.com

capsule.20m.com

alarm.gq.nu

alert.1hwy.com

Pajak.20m.com

Pajak.20fr.com


Notes for PR611, by Dr Jan Pajak


PR611 course has 14 credits, or 140 learning hours. It extends for two terms, or one semester, means for 16 weeks in total. It represents stage 2 of programming courses in C and C++ languages. It is composed of two parts, namely part 1 on "Procedural Programming", or "PP", and part 2 on "Object Orinted Programming", or "OO". Both parts extend for 8 weeks each. The lecture notes and example programs that I am presenting here are prepared for the Borland C++ Builder versions 5 and 6.
Notice that:
- In order to run or to download any of these solutions, simply click on the underlined part of the description of this solution!
- For further instructions see the end of this Web page.
- Click the button BACK (from the browser) to return to the previous Web page.
- The last update of the web page on: 23 July 2005.

Course outline:

Course Outline (for block 1 and 2 of 2003).

Theory Content:

Theory content of this course is based on the following textbook
[1] Deitel and Deitel: C++ How to Program, 4th Edition, Prentice Hall, ISBN 0-13-111881-1.
and it includes chapters 1 to 5 of [1].

Practical laboratory content:

(2003 - PP) Notes for the "Procedural Programming" part of PR611 (i.e. first 8 weeks):

Exercise PP1 (Typing in, compiling, and running your first C++ program. Keyboard input and screen output statements).

Exercise PP2 (Date and time in C++; system commands, string functions and their parameters).

Exercise PP3 (Selection and iteration statements in C++).

Exercise PP4 (Sequential file handling in C++: .open, .getline, .write, .close functions; backups).

Exercise PP5 (Modular programming in C++: functions and menu program).

Exercise PP6 (Bubble Sort).

Exercise PP7 (Array handling and strings handling in C++).

Exercise PP8 (Printing in C++ on a stand alone printer).



(2003 - OO) Notes for the "Object Oriented Programming" part of PR611 (i.e. another 8 weeks):

Lecture L1 (Classes and objects in OO C++).

Exercise OO1 (Typing in, compiling, and running your first GUI Borland C++ OO program; screen output methods).

Exercise OO2 (Random number generator).

Exercise OO3 (Date and time retrieval from the system in OO C+).

Exercise OO4 (Array handling, string handling and control statements in OO C++).

Lecture L7 (Inheritance and Polymorphism in OO C++).

2003 Assessments:

(2003 - PP Assessment) Examples of assessment for the "Procedural Programming" part of PR611 (i.e. first 8 weeks):

Assignment PP1 for PP C++. (PR611).

Assignment PP2 for PP C++. (PR611).

Assignment PP3 for PP C++. (PR611).

Assignment PP4 for PP C++. (PR611).

Assignment PP5 for PP C++. (PR611).

Sample problems for final test from PP C++. (PR611)


(2003 - OO Assessment) Examples of assessment topics for the "Object Oriented Programming" part of PR611 (i.e. another 8 weeks):

Assignment OO1 for PP C++. (PR611).

Assignment OO2 for PP C++. (PR611).

Sample problems for final test from OO C++. (PR611)

2003 Sample solutions:

(2003 - PP Solutions) Examples of solutions for assessments from the "Procedural Programming" part of PR611 (i.e. first 8 weeks):

Assignment PP4 example of source code. Console C++ source code: (basic solution for translation of month name).

Assignment PP4 example of EXE program. Executable program for a basic solution of month name translation.



(2003 - OO Solutions) Examples of solutions for assessment problems from the "Object Oriented Programming" part of PR611 (i.e. another 8 weeks):

Assignment OO1 example of source code. Console C++ source code: cylinder clas and object.

Assignment OO1 example of EXE program. Executable program for a cylinder clas and object.


Instructions on how to use this web page:

(1) Each C++ program is provided here in two versions, namely (a) as a source code (*.cpp), which is prepered for the Borland C++ Builder 5 or 6 (but in most of cases it also works on Microsoft Visual Studio 6 C++), and (b) as an executable version of a given C++ program (*.exe). Each one of these two versions needs to be downloaded separately.
(2) In order to download to your computer any of these two versions (*.cpp or/and *.exe) of a given C++ solution, click on this version, and then follow the instructions that appear in the downloading window.
(3) To return to this web page, click on the Back button on the tool palette of your browser.
(4) Some solutions are compressed into standard zip files. Therefore, you need to unzip them first before they are executed or compiled.
(5) If you wish to see any other related web pages - see the Links Page (e.g. the so-called "Blue Book" with prescriptions for PR621 (former PR21n) courses addressed here, are available at the web page http://www.naccq.ac.nz/bb_view/bbpre.html).
(6) Address for correspondence (February 2005): Dr Jan Pajak, P.O. Box 33250, Petone 6340, New Zealand.

8847