MT262

C++ Programming

I studied this course in 2002 and so far it has been my favourite OU course. The correct title for MT262 is actually "Putting computer systems to work", and that work is done by using the programming language C++. However, it should come with the following warning:

Warning! This course is addictive!

The thought of studying a computer language for the first time can be quite frightening, to say the least. However, MT262 provides a gentle introduction to program design and coding. It is a Level 2 course, worth 30 points. The basic skill you need on entry to the course is, in my opinion, familiarity with using a computer such as you would gain from doing T171. I had previously completed T171 and the only programming experience I had was BASIC some 20 years before, using a Commodore 128!

Let me just stress once again - I took this course in 2002, so some changes may have occurred since then. As far as I know the 2003 course will be almost identical to the 2002 one, just different TMA and assignment questions! Don't be put off by what you read here if you're new to programming. The course texts introduce you very gently to the material with plenty of hands-on practice, and don't forget the MT262 First Class Conferences for unrivalled help from students and tutors who are more experienced.

The course is split into 4 blocks. Get more details by clicking on the links. Remember, every Unit has worked examples and solutions to the exercises as well as a helpful summary at the end as to what you should understand.

  • Block 1.
    • Unit 1. An introduction to using Borland Builder software.
    • Unit 2. An introduction to program design, how one refines a design, then the final coding into C++. Variables are introduced and a program to calculate the mean of several numbers is discussed. Loops and selection with a worked example are shown.
    • Unit 3. Looping and branching are discussed with a calculator simulation as an example. Operations on strings is followed by a problem on word counting.
    • Unit 4. Validation and testing of your programs. How to debug programs to find syntax and semantic errors. A review of the problem solving process finishes off Block 1.

  • Block 2.
    • Unit 1. Introducing records and arrays. How to design and access records, operations on arrays. Tables and two-dimensional arrays. Unconditional loops (for loops) and then a practical problem involving arrays. How to search tables using a linear search and a sorting algorithm.
    • Unit 2.Functions are introduced. Designing a square root program and function. How to implement a function. Input and output functions, string handling functions. Reference parameters and passing arrays. Modular programming is introduced. File organisation.
    • Unit 3. Designing modular programs, using the warehouse problem as a major example. How to represent and implement the warehouse.
    • Unit 4. Input, output and files in C++. Coding the warehouse problem. Finally a review of Block 2.

  • Block 3.
    • Unit 1. Graphical User Interfaces. Using Builder's visual toolkit. Using forms and components. A simple Windows program is written. Inheritance, methods and events. Revisiting the mean value program - designing the interface and the event-driven program. Error handling. An object solution. The MT262 calculator program.
    • Unit 2. Using the warehouse problem to design a visual interface for a program. How to select components and create menus. Inheritance and wrapping. Multi-window designs.
    • Unit 3. Graphical output. Monitoring temperature. Data logging and file dialogs. Data display.
    • Unit 4. Using template classes. Further discussion of inheritance. Pointers. Programs and operating systems.

  • Block 4.
    • Unit 1. Introduction to computer graphics. Drawing lines and circles. A moving ball class. A kaleidoscope. Drawing algorithms. Images - bitmaps and zooming.
    • Unit 2. Designing and coding a solution to a graphical problem. Initial coding and testing followed by extending the design and adding further features.
    • Unit 3. A problem in emulation - designing an interface for a microwave oven and also an engine.
    • Unit 4. A review of each of the four Blocks with test exercises to aid exam revision.

Exam and Revision

TOP