Description
By coding five real-world projects, you will gain hands-on experience. Learn how to create a route planner using OpenStreetMap data, how to write a process monitor for your computer, and how to implement your own smart pointers. Finally, put your newfound knowledge to use by creating a multithreaded traffic simulator and writing your own C++ application.
Syllabus:
Course 1: C++ Foundations
Introduction to the C++ Language
- Build on your previous programming experience to learn the basics of the C++ language
- Use vectors, loops, and I/O libraries to parse data from a file and print an ASCII board. You will use this board in the next lesson for a simplified route planning application.
A* Search
- Learn about the A* search algorithm.
- Use your A* search implementation to plan a path through the obstacles in the ASCII board. The program will also be able to print the solution to the screen with clean ASCII formatting.
Writing Multifile Programs
- Learn the syntax for C++ language features
- Complete an overview of header files, pointers, build tools, and classes
Project Build an OpenStreetMap Route Planner
You'll look at IO2D map display code and learn about OpenStreetMap data. You will modify the IO2D map display code to use A*, allowing your programme to find a path between two points on the map. When the project is completed, you will be able to select starting and ending points on a city map, and your programme will find a path through the city streets to connect the points.
Course 2: Object-Oriented Programming
Introduction to OOP in C++
- Meet your instructors, get some context for what object oriented programming (OOP) is
- Practice implementing some of the basic features of OOP, like encapsulation and abstraction.
Access Modifiers and Inheritance
- C++ classes have extensive functionality when it comes to what kind of members you can define within a class and how you can prevent or provide access to those members. In addition, like many other languages, one class can inherit from another. In this lesson, you’ll investigate the intricacies of access modifiers and inheritance to build more complex C++ classes.
Polymorphism and Templates
- Write member functions for a class that do different things depending on what parameters you pass to them.
- Using templates, write generic functions that accept many different kinds of input parameter types. With these tools you will add more diverse functionality to your C++ classes
Project: System Monitor
You will have the opportunity to use C++ OOP in this project! You will create a Linux system monitor with functionality similar to the widely used htop application. This will not only familiarise you with the Linux operating system, but will also provide you with insights into how a collection of objects can work together in C++ to form an exciting and complete application!
Course 3: Memory Management
Overview of Memory Types
- Understand the memory hierarchy in computer systems, which is the basis for efficient memory management
- Cover basic concepts such as cache, virtual memory, and the structure of memory addresses.
- Demonstrate how the debugger can be used to read data from memory
Variables and Memory
- In this section, the process memory model is introduced, which contains the two fundamental memory areas, heap and stack, which play an important role in C++.
- Review the concepts of call-by-value and call-by-reference to lay the foundations for the memory-efficient passing of parameters.
Dynamic Memory Allocation (The Heap)
- This section introduces dynamic memory allocation on the heap. Understand the main difference between stack and heap - the latter requires the programmer to take decisions about the correct allocation and deallocation of memory.
- Learn the commands malloc and free, as well as new and delete, that are available for allocation of memory.
- Review some of the most common problems with manual memory management
Resource Copying Policies
- Customize resource copying using the Rule of Three.
- Learn the basis for move semantics, lvalue and rvalue
- Understand how the mechanism for memory efficient programming is one of the most important innovations in C++ and enables fast and low-cost data transfers between program scopes.
- Understand the Rule of Five, which helps develop a thorough memory management strategy in your code.
Smart Pointers
- Understand why smart pointers are a valuable tool for C++ programmers and how they help to avoid memory leaks and make it possible to establish a clear and concise resource ownership model.
- Compare the three types of smart pointers in C++
- Learn how to transfer ownership from one program part to another using copy and move semantics.
Project: ChatBot
The ChatBot project generates a dialogue in which users can ask questions about memory management in C++. Your task will be to optimize the project with memory management in mind, making use of modern concepts like smart pointers and move semantics.
Course 4: Concurrency
Managing Threads
- Learn the differences between processes and threads.
- Start your own threads in various ways and pass data to them.
- Write your own concurrent program running multiple threads at the same time.
Passing Data Between Threads
- Use promises and futures as a safe communication channel between threads.
- Use tasks as an easy alternative to threads.
- Understand data races and learn about strategies to avoid them.
Mutexes, Locks, and Condition Variables
- Use mutexes and locks to safely access shared data from various threads.
- Use condition variables as a basic synchronization tool between threads.
- Understand and implement a concurrent message queue for flexible inter-thread communication.
Project: Concurrent Traffic Simulation
Create a multithreaded traffic simulator with a real-world urban map.
Using cutting-edge concurrency concepts, run each vehicle on a separate thread and manage intersections to facilitate traffic flow and avoid collisions.
Course 4: Capstone Project
Project: Build Your Own C++ Application
- Select your application.
- Create the architecture.
- Create a prototype.
Finish your application using the core skills you've learned: C++ fundamentals, object-oriented programming, memory management, and concurrency.