Course Outline C Plus Plus
Course Outline C Plus Plus
Lesson: Introduction to variables, data types (int, float, char), and variable declaration.
Exercise: Write a program that asks for the user's name and greets them.
Exercise: Write a program that takes two numbers and prints their sum, difference, product, and
quotient.
Exercise: Write a program to print even numbers between 1 and 20 using a while loop.
Exercise: Write a function to add two numbers and call it from main().
Lesson: Introduction to strings, string class in C++, and basic string operations.
Exercise: Write a program that asks for a string input and prints it in reverse.
Lesson: Basic concept of pointers, declaring pointers, and * and & operators.
Exercise: Write a program that shows the address of a variable using a pointer.
Exercise: Define a class Car with attributes brand and model, and create an object to print these
attributes.
Exercise: Modify the Car class to include a constructor that initializes brand and model.
Exercise: Create a derived class ElectricCar from the Car class with an additional attribute
batteryCapacity.
Exercise: Write a program to create a file and write some text to it.