SlideShare a Scribd company logo
SUMMATION
Michael Heron
Introduction
• We have reached the end of our journey through object
orientation in C++
• Huzzah, hooray, etc, etc
• As the last lecture on the topic, we are going to recap on
all the significant theoretical concepts.
• Not rehash, just recap.
• This knowledge will Guide You Well when it comes to the
exam.
• These are things you are expected to know!
The Principles of OO
• OO is based primarily on three key principles.
• Inheritance
• Encapsulation
• Polymorphism.
• Together they form a mighty triad of techniques for
building genuinely powerful programs.
• These three together is why it is a fundamentally different style
from structured programming.
The Principles of OO
• Object oriented structures are not inherently scalable.
• You need to be careful with what you do.
• Metrics such as coupling and cohesion give a view of the
objective quality of a class hierarchy.
• Methods such as impact of change give a view of the
maintainability of a system.
Why OO?
• Why do we code using objects?
• Easier for humans to understand?
• No.
• More efficient?
• No
• More maintainable
• Yes
• More expandable
• Yes
• Reusable
• Kinda
• Powerful?
• Very much so.
Inheritance
• The process of inheritance is to assume the methods and
attributes of another class.
• Modified by the visibility of those methods and parameters.
• Java permits single inheritance only.
• As does C#
• C++ permits multiple inheritance.
• There be dragons.
• Only one genuinely good thing comes from multiple inheritance in
C++
Encapsulation
• Encapsulation is the process of bundling the attributes of
a class along with the methods that act upon those
attributes.
• Goes hand in hand with the topic of information hiding.
• Should ensure a separation of abstraction and
implementation.
• Access to functionality available only through predefined interfaces.
Polymorphism
• The most abstract of the three.
• It’s the technique of treating a specialised class as an instance of a
more general class.
• Significant differences between C++ and Java here.
• All methods in java are inherently virtual.
• In C++, method virtuality must be declared as part of the class
definition.
• Only virtual methods will be called as the most specialised
version.
Overloading and Overriding
• Object orientation is about providing a consistent interface
to an object.
• There are various techniques that allow us to do this.
• Three key ways in which this is done in C++
• Method overloading
• Method overriding
• Operator overloading
• The last is not available in Java
• Which is a good thing.
Method Overloading
• Process used to permit multiple interfaces to a single
method.
• Don’t need to learn two sets of methods
• One method with two sets of parameters.
• Reduces the cognitive burden on using an object.
• Ensures consistency across an interface.
• Can be overdone.
Method Overriding
• Method Overriding is the process of providing a
specialised implementation of a single method.
• Incorporated strongly into polymorphism and inheritance.
• Works through the use of virtual methods in C++
• In Java, all methods are implicitly virtual.
Operator Overloading
• C++ permits for operators to be overloaded.
• Change the way the basic + and – operators work on objects.
• Leads easily to code obfuscation.
• Need to understand not only the objects, but how and where they can
be applied to base operators.
• Handled using overridden methods in Java.
• A more elegant approach for a more civilized age.
Abstraction
• Abstraction is a key element in programming.
• It’s the process of getting rid of the low level details to focus on the
high level interactions.
• Is both conceptual and technical as a term.
• Abstraction is a general process
• Abstract classes are a specific kind of abstraction in object oriented
programs.
• Understanding the flow of execution through a class hierarchy
requires understanding of abstraction.
Abstract Classes
• Abstract classes cannot be instantiated.
• They can only serve as the basis for other derived classes.
• They can enforce a polymorphic contract with the compiler.
• A class in Java is made abstract via a special keyword.
• A class in C++ is made abstract by the inclusion of a pure
virtual method
Pure Virtual Methods
• A virtual method in C++ may be over-riden if the
developer desires.
• A pure virtual method must be over-ridden.
• Classes which incorporate no code and only pure virtual
methods can be used as interfaces.
• Java has a special keyword for this too.
• Only good use of multiple inheritance.
Templates
• Abstraction as a concept leads into the concrete
implementation of templates.
• Boilerplate code
• Code is generated by the compiler based on typing information.
• Templates are a powerful tool
• Used to good effect in the Standard Template Library.
• A library of C++ classes for everyone to use.
STL
• The Standard Template Library contains implementations
of:
• Sequential containers
• Adapter containers
• Associative containers
• Worthwhile exercise to write these structures from
scratch.
• Understanding gained by doing this.
• Worth using the STL structures for ‘live’ code.
Stream Based I/O
• I/O in C++ based primarily on streams.
• Polymorphism allows for the same basic operators to work on file
and keyboard/monitor I/O
• I/O operations quite flexible.
• You can modify the presentation quite a bit.
• However, object representation in files remains complex.
• Serialization is the process used, and not natively supported in
C++.
Static
• Static methods in object oriented languages are class
methods.
• They belong to a class, not to an instance.
• Static attributes in object oriented languages are class
attributes.
• All objects share the same data field for this.
• Static methods are limited.
• Can only call on other static methods or attributes.
Const
• The const modifier in C++ is used to specify different
behaviour depending on where it is used.
• Can specify a constant value
• Can specific an unchangeable value
• Can specify a method that cannot change instance attributes.
• Indiscriminate use of const usually a sign of bad design.
Moving On
• Where do you go… from here?
• Anywhere you like.
• The knowledge of C++ you have gained during this
module is transferable.
• You’ll find related concepts in any real OO language.
• We have spoken quite a bit about how the concepts relate to Java.
• They relate just as well in C#
But… why?
• All of these concepts are complicated by the nature of
pointers.
• Pointers are the secret engine behind C++
• C++ is a complicated language because it layers pointer
troubles on top of conceptual troubles.
• Why do this module in C++?
• Several reasons.
C++ in Industry
• C++ remains one of the most popular languages in
industry.
• It’s not the most popular, but you’ll encounter it often in Real Life.
• People who can code in C++ or C are a dying breed.
• ‘Too complicated’
• However, you learn things in C++ you don’t in other
languages.
C++ The Language
• Even if you never create another pointer, simply
understanding how they work opens up a world that other
languages hide.
• C++ more than any other language requires you to understand the
implications of what you are doing.
• This is an important mental skill.
• It’s not just about the code.
• It’s about the concepts.
Memory Management
• C++ has explicit memory management.
• No inherent, automated
• garbage collection as in Java
• We must manually handler pointers and dynamic memory
ourselves.
• This has implications for our design.
• Copy constructors
• Overloaded assignment operators
• Destructors
• Learning to do this is a good mental exercise.
• Albeit frustrating.
Next Week
• Next week is your consolidation week.
• Use the time wisely, young padawans. Padawen? Padawii?
• The lab will be staffed as always.
• Only two contact hours for the scheduled lecture time.
• Lab prep on Monday.
• Q&A about your current assessment.
• Bring questions about the assessment if you have any.
• Drop in tutorial on Thursday
• Come along if you have any questions relating to OO concepts.
• No planned content otherwise.
Summary
• Our discussion of OO in C++ is at an end.
• Alas, alas
• Next week is the consolidation week.
• Finish up what you’re working with.
• The week after you’ll be learning about data structures with
Manuel.
• These build on the concepts we have discussed over the past few
weeks.
• Have fun!
• Snausages.

More Related Content

PPTX
Software development fundamentals
Alfred Jett Grandeza
 
PPT
Teaching Object Oriented Programming Courses by Sandeep K Singh JIIT,Noida
Dr. Sandeep Kumar Singh
 
PPTX
Clean Code
swaraj Patil
 
PPTX
05 distance learning standards-scorm research
宥均 林
 
PDF
Ruby Metaprogramming 08
Brian Sam-Bodden
 
PDF
A Teamwork-based Approach to Programming Fundamentals with Scheme, Smalltalk ...
Michele Lanza
 
PPTX
2018 12-kube con-ballerinacon
Sanjiva Weerawarana
 
PDF
ICS1020 NLP 2020
Vanessa Camilleri
 
Software development fundamentals
Alfred Jett Grandeza
 
Teaching Object Oriented Programming Courses by Sandeep K Singh JIIT,Noida
Dr. Sandeep Kumar Singh
 
Clean Code
swaraj Patil
 
05 distance learning standards-scorm research
宥均 林
 
Ruby Metaprogramming 08
Brian Sam-Bodden
 
A Teamwork-based Approach to Programming Fundamentals with Scheme, Smalltalk ...
Michele Lanza
 
2018 12-kube con-ballerinacon
Sanjiva Weerawarana
 
ICS1020 NLP 2020
Vanessa Camilleri
 

Viewers also liked (18)

PPTX
2CPP10 - Polymorphism
Michael Heron
 
PPTX
2CPP13 - Operator Overloading
Michael Heron
 
PPTX
2CPP12 - Method Overriding
Michael Heron
 
PPTX
2CPP18 - Modifiers
Michael Heron
 
PDF
C++primer
leonlongli
 
PPT
2CPP15 - Templates
Michael Heron
 
PPTX
2CPP04 - Objects and Classes
Michael Heron
 
PPTX
2CPP03 - Object Orientation Fundamentals
Michael Heron
 
PPT
2CPP16 - STL
Michael Heron
 
PPTX
2CPP07 - Inheritance
Michael Heron
 
PPTX
2CPP11 - Method Overloading
Michael Heron
 
PPTX
2CPP05 - Modelling an Object Oriented Program
Michael Heron
 
PPTX
2CPP06 - Arrays and Pointers
Michael Heron
 
PPTX
2CPP02 - C++ Primer
Michael Heron
 
PPTX
2CPP14 - Abstraction
Michael Heron
 
PPTX
2CPP17 - File IO
Michael Heron
 
PPTX
2CPP08 - Overloading and Overriding
Michael Heron
 
PPTX
2CPP09 - Encapsulation
Michael Heron
 
2CPP10 - Polymorphism
Michael Heron
 
2CPP13 - Operator Overloading
Michael Heron
 
2CPP12 - Method Overriding
Michael Heron
 
2CPP18 - Modifiers
Michael Heron
 
C++primer
leonlongli
 
2CPP15 - Templates
Michael Heron
 
2CPP04 - Objects and Classes
Michael Heron
 
2CPP03 - Object Orientation Fundamentals
Michael Heron
 
2CPP16 - STL
Michael Heron
 
2CPP07 - Inheritance
Michael Heron
 
2CPP11 - Method Overloading
Michael Heron
 
2CPP05 - Modelling an Object Oriented Program
Michael Heron
 
2CPP06 - Arrays and Pointers
Michael Heron
 
2CPP02 - C++ Primer
Michael Heron
 
2CPP14 - Abstraction
Michael Heron
 
2CPP17 - File IO
Michael Heron
 
2CPP08 - Overloading and Overriding
Michael Heron
 
2CPP09 - Encapsulation
Michael Heron
 
Ad

Similar to 2CPP19 - Summation (20)

PDF
M.c.a (sem iii) paper - i - object oriented programming
रवींद्र वैद्य
 
PPTX
C++ Basics
Himanshu Sharma
 
PDF
C++
Rome468
 
PPT
lecture02-cpp.ppt
ssuser0c24d5
 
PPT
lecture02-cpp.ppt
nilesh405711
 
PPT
lecture02-cpp.ppt
DevliNeeraj
 
PPT
lecture02-cpp.ppt
YashpalYadav46
 
PPTX
Interoduction to c++
Amresh Raj
 
PPTX
lecture NOTES ON OOPS C++ ON CLASS AND OBJECTS
NagarathnaRajur2
 
PPT
lecture02-cpp.ppt
MZGINBarwary
 
PPT
c++ ppt.ppt
FarazKhan89093
 
PPTX
C++ Introduction brown bag
Jacob Green
 
PPT
lecture5-cpp.pptintroduccionaC++basicoye
quetsqrj
 
PPT
Introduction to Inheritance in C plus plus
University of Sindh
 
PPTX
Procedure Oriented programming Object Oriented programming Basic Concept of ...
Govt Engineering college badliya ajmer Rajasthan
 
PDF
L6
lksoo
 
PPT
C++ - A powerful and system level language
dhimananshu130803
 
PPT
UsingCPP_for_Artist.ppt
vinu28455
 
DOCX
C++ & Design Patterns Quicky
Nikunj Parekh
 
DOCX
C++ & Design Patterns - primera parte
Nikunj Parekh
 
M.c.a (sem iii) paper - i - object oriented programming
रवींद्र वैद्य
 
C++ Basics
Himanshu Sharma
 
C++
Rome468
 
lecture02-cpp.ppt
ssuser0c24d5
 
lecture02-cpp.ppt
nilesh405711
 
lecture02-cpp.ppt
DevliNeeraj
 
lecture02-cpp.ppt
YashpalYadav46
 
Interoduction to c++
Amresh Raj
 
lecture NOTES ON OOPS C++ ON CLASS AND OBJECTS
NagarathnaRajur2
 
lecture02-cpp.ppt
MZGINBarwary
 
c++ ppt.ppt
FarazKhan89093
 
C++ Introduction brown bag
Jacob Green
 
lecture5-cpp.pptintroduccionaC++basicoye
quetsqrj
 
Introduction to Inheritance in C plus plus
University of Sindh
 
Procedure Oriented programming Object Oriented programming Basic Concept of ...
Govt Engineering college badliya ajmer Rajasthan
 
L6
lksoo
 
C++ - A powerful and system level language
dhimananshu130803
 
UsingCPP_for_Artist.ppt
vinu28455
 
C++ & Design Patterns Quicky
Nikunj Parekh
 
C++ & Design Patterns - primera parte
Nikunj Parekh
 
Ad

More from Michael Heron (16)

PPTX
Meeple centred design - Board Game Accessibility
Michael Heron
 
PPTX
Musings on misconduct
Michael Heron
 
PDF
Accessibility Support with the ACCESS Framework
Michael Heron
 
PDF
ACCESS: A Technical Framework for Adaptive Accessibility Support
Michael Heron
 
PPTX
Authorship and Autership
Michael Heron
 
PDF
Text parser based interaction
Michael Heron
 
PPTX
SAD04 - Inheritance
Michael Heron
 
PPT
GRPHICS08 - Raytracing and Radiosity
Michael Heron
 
PPT
GRPHICS07 - Textures
Michael Heron
 
PPT
GRPHICS06 - Shading
Michael Heron
 
PPT
GRPHICS05 - Rendering (2)
Michael Heron
 
PPT
GRPHICS04 - Rendering (1)
Michael Heron
 
PPTX
GRPHICS03 - Graphical Representation
Michael Heron
 
PPTX
GRPHICS02 - Creating 3D Graphics
Michael Heron
 
PPTX
GRPHICS01 - Introduction to 3D Graphics
Michael Heron
 
PPT
GRPHICS09 - Art Appreciation
Michael Heron
 
Meeple centred design - Board Game Accessibility
Michael Heron
 
Musings on misconduct
Michael Heron
 
Accessibility Support with the ACCESS Framework
Michael Heron
 
ACCESS: A Technical Framework for Adaptive Accessibility Support
Michael Heron
 
Authorship and Autership
Michael Heron
 
Text parser based interaction
Michael Heron
 
SAD04 - Inheritance
Michael Heron
 
GRPHICS08 - Raytracing and Radiosity
Michael Heron
 
GRPHICS07 - Textures
Michael Heron
 
GRPHICS06 - Shading
Michael Heron
 
GRPHICS05 - Rendering (2)
Michael Heron
 
GRPHICS04 - Rendering (1)
Michael Heron
 
GRPHICS03 - Graphical Representation
Michael Heron
 
GRPHICS02 - Creating 3D Graphics
Michael Heron
 
GRPHICS01 - Introduction to 3D Graphics
Michael Heron
 
GRPHICS09 - Art Appreciation
Michael Heron
 

Recently uploaded (20)

PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PDF
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
Activate_Methodology_Summary presentatio
annapureddyn
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Exploring AI Agents in Process Industries
amoreira6
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
vAdobe Premiere Pro 2025 (v25.2.3.004) Crack Pre-Activated Latest
imang66g
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 

2CPP19 - Summation

  • 2. Introduction • We have reached the end of our journey through object orientation in C++ • Huzzah, hooray, etc, etc • As the last lecture on the topic, we are going to recap on all the significant theoretical concepts. • Not rehash, just recap. • This knowledge will Guide You Well when it comes to the exam. • These are things you are expected to know!
  • 3. The Principles of OO • OO is based primarily on three key principles. • Inheritance • Encapsulation • Polymorphism. • Together they form a mighty triad of techniques for building genuinely powerful programs. • These three together is why it is a fundamentally different style from structured programming.
  • 4. The Principles of OO • Object oriented structures are not inherently scalable. • You need to be careful with what you do. • Metrics such as coupling and cohesion give a view of the objective quality of a class hierarchy. • Methods such as impact of change give a view of the maintainability of a system.
  • 5. Why OO? • Why do we code using objects? • Easier for humans to understand? • No. • More efficient? • No • More maintainable • Yes • More expandable • Yes • Reusable • Kinda • Powerful? • Very much so.
  • 6. Inheritance • The process of inheritance is to assume the methods and attributes of another class. • Modified by the visibility of those methods and parameters. • Java permits single inheritance only. • As does C# • C++ permits multiple inheritance. • There be dragons. • Only one genuinely good thing comes from multiple inheritance in C++
  • 7. Encapsulation • Encapsulation is the process of bundling the attributes of a class along with the methods that act upon those attributes. • Goes hand in hand with the topic of information hiding. • Should ensure a separation of abstraction and implementation. • Access to functionality available only through predefined interfaces.
  • 8. Polymorphism • The most abstract of the three. • It’s the technique of treating a specialised class as an instance of a more general class. • Significant differences between C++ and Java here. • All methods in java are inherently virtual. • In C++, method virtuality must be declared as part of the class definition. • Only virtual methods will be called as the most specialised version.
  • 9. Overloading and Overriding • Object orientation is about providing a consistent interface to an object. • There are various techniques that allow us to do this. • Three key ways in which this is done in C++ • Method overloading • Method overriding • Operator overloading • The last is not available in Java • Which is a good thing.
  • 10. Method Overloading • Process used to permit multiple interfaces to a single method. • Don’t need to learn two sets of methods • One method with two sets of parameters. • Reduces the cognitive burden on using an object. • Ensures consistency across an interface. • Can be overdone.
  • 11. Method Overriding • Method Overriding is the process of providing a specialised implementation of a single method. • Incorporated strongly into polymorphism and inheritance. • Works through the use of virtual methods in C++ • In Java, all methods are implicitly virtual.
  • 12. Operator Overloading • C++ permits for operators to be overloaded. • Change the way the basic + and – operators work on objects. • Leads easily to code obfuscation. • Need to understand not only the objects, but how and where they can be applied to base operators. • Handled using overridden methods in Java. • A more elegant approach for a more civilized age.
  • 13. Abstraction • Abstraction is a key element in programming. • It’s the process of getting rid of the low level details to focus on the high level interactions. • Is both conceptual and technical as a term. • Abstraction is a general process • Abstract classes are a specific kind of abstraction in object oriented programs. • Understanding the flow of execution through a class hierarchy requires understanding of abstraction.
  • 14. Abstract Classes • Abstract classes cannot be instantiated. • They can only serve as the basis for other derived classes. • They can enforce a polymorphic contract with the compiler. • A class in Java is made abstract via a special keyword. • A class in C++ is made abstract by the inclusion of a pure virtual method
  • 15. Pure Virtual Methods • A virtual method in C++ may be over-riden if the developer desires. • A pure virtual method must be over-ridden. • Classes which incorporate no code and only pure virtual methods can be used as interfaces. • Java has a special keyword for this too. • Only good use of multiple inheritance.
  • 16. Templates • Abstraction as a concept leads into the concrete implementation of templates. • Boilerplate code • Code is generated by the compiler based on typing information. • Templates are a powerful tool • Used to good effect in the Standard Template Library. • A library of C++ classes for everyone to use.
  • 17. STL • The Standard Template Library contains implementations of: • Sequential containers • Adapter containers • Associative containers • Worthwhile exercise to write these structures from scratch. • Understanding gained by doing this. • Worth using the STL structures for ‘live’ code.
  • 18. Stream Based I/O • I/O in C++ based primarily on streams. • Polymorphism allows for the same basic operators to work on file and keyboard/monitor I/O • I/O operations quite flexible. • You can modify the presentation quite a bit. • However, object representation in files remains complex. • Serialization is the process used, and not natively supported in C++.
  • 19. Static • Static methods in object oriented languages are class methods. • They belong to a class, not to an instance. • Static attributes in object oriented languages are class attributes. • All objects share the same data field for this. • Static methods are limited. • Can only call on other static methods or attributes.
  • 20. Const • The const modifier in C++ is used to specify different behaviour depending on where it is used. • Can specify a constant value • Can specific an unchangeable value • Can specify a method that cannot change instance attributes. • Indiscriminate use of const usually a sign of bad design.
  • 21. Moving On • Where do you go… from here? • Anywhere you like. • The knowledge of C++ you have gained during this module is transferable. • You’ll find related concepts in any real OO language. • We have spoken quite a bit about how the concepts relate to Java. • They relate just as well in C#
  • 22. But… why? • All of these concepts are complicated by the nature of pointers. • Pointers are the secret engine behind C++ • C++ is a complicated language because it layers pointer troubles on top of conceptual troubles. • Why do this module in C++? • Several reasons.
  • 23. C++ in Industry • C++ remains one of the most popular languages in industry. • It’s not the most popular, but you’ll encounter it often in Real Life. • People who can code in C++ or C are a dying breed. • ‘Too complicated’ • However, you learn things in C++ you don’t in other languages.
  • 24. C++ The Language • Even if you never create another pointer, simply understanding how they work opens up a world that other languages hide. • C++ more than any other language requires you to understand the implications of what you are doing. • This is an important mental skill. • It’s not just about the code. • It’s about the concepts.
  • 25. Memory Management • C++ has explicit memory management. • No inherent, automated • garbage collection as in Java • We must manually handler pointers and dynamic memory ourselves. • This has implications for our design. • Copy constructors • Overloaded assignment operators • Destructors • Learning to do this is a good mental exercise. • Albeit frustrating.
  • 26. Next Week • Next week is your consolidation week. • Use the time wisely, young padawans. Padawen? Padawii? • The lab will be staffed as always. • Only two contact hours for the scheduled lecture time. • Lab prep on Monday. • Q&A about your current assessment. • Bring questions about the assessment if you have any. • Drop in tutorial on Thursday • Come along if you have any questions relating to OO concepts. • No planned content otherwise.
  • 27. Summary • Our discussion of OO in C++ is at an end. • Alas, alas • Next week is the consolidation week. • Finish up what you’re working with. • The week after you’ll be learning about data structures with Manuel. • These build on the concepts we have discussed over the past few weeks. • Have fun! • Snausages.