QUESTIONS AND
ANSWERS
FOR ASSISTANCE CONTACT
EMAIL:gabrielmusyoka940@gmail.com
, lOMoARcPSD|31863004
COS1512/102/3/2024
Tutorial letter 102/3/2024
Introduction to Programming II
COS1512
Semesters 1 & 2
School of Computing
IMPORTANT INFORMATION:
Study Guide for COS1512
, lOMoARcPSD|31863004
Study Guide for COS1512
Contents
Introduction.............................................................................................................................................….3
Guide to the prescribed book ............................................................................................................. 5
Chapter 1: Introduction to Computers and C++ Programming ........................................................... . 5
Chapter 4: Procedural Abstraction and Functions That Return a Value .............................................. . 8
Chapter 5: Functions for All Subtasks ............................................................................................. . 9
Chapter 6: I/O Streams as an Introduction to Objects and Classes .................................................... 10
Chapter 8: Strings and Vectors ...................................................................................................... 14
Chapter 9: Pointers and Dynamic Arrays ........................................................................................ 16
Introduction
Welcome to COS1512, an introduction to objects and the object-oriented programming
environment. This study guide accompanies the prescribed book for COS1512:
Walter Savitch. Problem Solving with C++, 9 th edition. Pearson Education, Inc, 2012.
We will refer to the prescribed book as Savitch.
Note that this study guide is applicable to the 7 th, 8th and 9 th edition of Savitch throughout.
Tutorial Letter 101 specifies the sections in Savitch that are covered in COS1512. We repeat
them here for your convenience. Some of the work in the prescribed book is also covered by
COS1511, and therefore only certain sections and chapters are covered in COS1512. The path
that COS1512 follows through the prescribed book can be outlined broadly as follows:
Section 1.2 in chapter 1 provides a general overview over programming and problem-solving
with a brief introduction to object-oriented programming. Though most of chapters 4 and 5 have
been covered in COS1511, section 4.6 (overloading functions) and section 5.5 (the assert
macro) are included to ensure that students have the necessary background knowledge to
understand and implement object-oriented programming. Chapter 6 uses file I/O streams as an
introduction to objects and classes, and teaches students how to use pre-defined classes.
Chapter 8 builds on using pre-defined classes by introducing the standard class string.
Chapter 8 also covers C strings and provides a preview of the Standard Template Library (STL)
with the vector class. Chapter 9 further adds to the background knowledge necessary to
understand and implement classes and objects by discussing pointers and dynamic arrays. In
Chapter 10 students learn how to define their own classes in order to create an abstract data
type (ADT). Chapter 10 also covers inheritance briefly in order to make students aware of this
concept. Chapter 11 continues to teach more techniques for defining functions and operators
for classes. Chapter 12 covers separate compilation, to allow placing the interface and
implementation of an ADT in files separate from each other and separate from the programs
that use the ADT. In Chapter 14 recursion is introduced. In Chapter 15 single inheritance, i.e.
deriving one class from another is covered. In Chapter 17 function and class templates are
covered, which will allow students to understand and use the STL.
The specific learning outcomes and assessment criteria for COS1512 are provided in section 2
of Tutorial Letter 101. These specific learning outcomes translate to learning objectives for the
study material which should be achieved in order to realise the learning outcomes. This study
guide specifies the learning objectives for each section in the prescribed book.
The discussion of each chapter in Savitch given in this tutorial letter typically includes these
subsections:
Overview
Learning Objectives.
The Overview indicates the main issues addressed in each chapter. The Learning Objectives
of each chapter are the skills you should acquire when mastering the content of the chapter.
You will be tested on these skills in the examination. These objectives can be achieved by
doing the self-test exercises and the assignments, implementing the examples given in the
textbook and doing some additional exercises.
3
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller gabrielmusyoka940. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R46,83. You're not tied to anything after your purchase.