"C++ Basics Sessions": Session 1: Introduction To Programming & C++
"C++ Basics Sessions": Session 1: Introduction To Programming & C++
• Objectives:
o How Computers work?
o Why computer only understand 0,1?
o Major components of a computer.
o The Evaluation of programming language and Understand what programming is and
the concept of high-level vs low-level languages.
o Get familiar with the basic structure of a C++ program (including #include, using
namespace std;, int main(), etc.).
o Input and output using cin and cout
o Learn how to compile and run a simple C++ program.
• Objectives:
o Understand different data types in C++ (int, float, char, bool, etc.) and their usage.
o Learn how to declare and initialize variables.
o Explore basic operators and their behavior with different data types
oCreate a C++ program that declares variables to store the following information for
books:
o bookID (integer) - Unique identifier for each book
o title (string) - Title of the book
o author (string) - Author(s) of the book
o genre (string) - Genre of the book (e.g., fiction, non-fiction)
o isAvailable (boolean) - Flag indicating if the book is available for borrowing
(true) or borrowed (false)
o Create variables to store the following information for customers:
o customerID (integer) - Unique identifier for each customer
o name (string) - Customer's full name
o contactInfo (string) - Customer's contact information (phone number, email)
Session 4: Control Flow Statements
• Objectives:
o Understand conditional statements (if-else, switch) for making decisions.
o Learn about loop statements (for, while, do-while) for repetitive tasks.
• Activities:
o Explanation of conditional statements with examples (e.g., checking user input,
grade calculation).
o Interactive coding practice using if-else and switch statements.
o Introduction to loop statements, their syntax, and common use cases.
o Hands-on exercises with loops (e.g., printing patterns, calculating summations).
• Projects & Assignments:
o Task: Book Search and Availability Check Implement a feature in the Library
Management System to allow users to search for books by title or author and check
their availability for borrowing. Utilize conditional statements (if-else) to determine the
book's existence and availability, and implement loop statements (for, while, or do-
while) for efficient searching through the library's database.
Session 5: Functions
• Objectives:
o Understand the concept of functions for code reusability.
o Learn how to define functions with parameters and return values.
o Explore function calls and passing arguments by value.
• Activities:
o Presentation on functions with code examples (e.g., calculation functions).
o Coding exercises to create and use simple functions for calculations or text
manipulation.
• Projects & Assignments:
o Task: Book Reservation System Functionality Implement reservation feature in
Library Management System for users to reserve books. Define functions like
reserveBook() to handle reservations and checkAvailability() to verify book
availability. Present functions' concept with examples. Assign exercises for creating
and using functions for calculations or text manipulation.