Object Oriented Programming Language Lab

This laboratory course provides hands-on experience in Object-Oriented Programming using C++. Students will implement classes, objects, constructors, destructors, encapsulation, inheritance, polymorphism, abstraction, function overloading, operator overloading, file handling, templates, exception handling, and Standard Template Library components through practical programming exercises, problem-solving activities, and project development.

Instructor: Md. Shakil Ahmed

Term: Fall

Object Oriented Programming Language Lab

CSE 1201-2 · Object-Oriented Programming Laboratory · 1.5 Credit Hours

This laboratory course provides hands-on experience in Object-Oriented Programming using C++. Students will implement classes, objects, constructors, destructors, encapsulation, inheritance, polymorphism, abstraction, function overloading, operator overloading, file handling, templates, exception handling, and Standard Template Library components through practical programming exercises, problem-solving activities, and project development.
C++ Object-Oriented Programming Classes Objects Encapsulation Inheritance Polymorphism Abstraction File Handling Templates Exception Handling STL Problem Solving Project Development

Course Overview

This laboratory course provides students with practical experience in Object-Oriented Programming using the C++ programming language. The course is designed to complement the theoretical concepts of object-oriented programming by providing hands-on implementation of fundamental and advanced object-oriented programming concepts.

Students will develop programs using classes, objects, constructors, destructors, encapsulation, inheritance, polymorphism, abstraction, function overloading, operator overloading, file handling, templates, exception handling, and the Standard Template Library. The laboratory also emphasizes debugging, code reuse, software design, algorithmic problem-solving, and project development through practical programming exercises.

By the end of this course, students will be able to:

  • Implement C++ programs using fundamental programming and object-oriented programming principles.
  • Design and implement classes and objects using appropriate access control and encapsulation.
  • Implement constructors, destructors, function overloading, and operator overloading.
  • Apply inheritance and polymorphism to develop reusable and extensible C++ programs.
  • Implement abstraction using abstract classes and pure virtual functions.
  • Perform file input and output operations using C++ file streams.
  • Implement generic programs using function and class templates.
  • Handle runtime errors using C++ exception-handling mechanisms.
  • Use Standard Template Library containers, iterators, and algorithms to solve programming problems.
  • Design, implement, debug, test, and document object-oriented programming projects.

Course Learning Outcomes

CLO1 — Classes and Objects

Design and implement classes and objects using constructors, destructors, access specifiers, and encapsulation to develop structured C++ programs.

CLO2 — Inheritance and Polymorphism

Apply inheritance, function overriding, virtual functions, and polymorphism to develop reusable and extensible object-oriented programs.

CLO3 — Advanced C++ Programming

Implement abstraction, file handling, templates, exception handling, and other advanced C++ programming techniques.

CLO4 — STL and Project Development

Use Standard Template Library components to solve programming problems and develop, test, debug, document, and present object-oriented programming projects.

Prerequisites

  • Basic programming knowledge.
  • Basic problem-solving skills.
  • Familiarity with fundamental programming concepts.
  • Basic understanding of procedural programming.
  • Basic knowledge of C or C++ programming.

Textbooks

  • Primary: The C++ Programming Language by Bjarne Stroustrup.

Reference Books

  • Object-Oriented Programming with C++ by E. Balagurusamy.
  • C++ Primer, 5th Edition, by Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo.

Tools and Platforms

C++ Development Environment

C++ programming language, GCC/G++ compiler, Visual Studio Code, Code::Blocks, Microsoft Visual Studio, and other C++ development environments.

Programming Libraries and Platforms

C++ Standard Template Library, online C++ compilers, online programming platforms, and competitive programming platforms for practical problem solving.

Online Resources

Course Schedule

Week Topic Description
1 Introduction to C++ Programming and Object-Oriented Programming Introduction to the C++ programming environment, compiler and IDE setup, basic C++ program structure, input and output operations, namespaces, and implementation of simple C++ programs.
2 Data Types, Operators, Control Structures, and Functions Practical implementation of C++ data types, operators, expressions, conditional statements, loops, nested control structures, and functions through programming exercises and problem-solving tasks.
3 Functions and Function-Based Problem Solving Implementation of function declaration and definition, parameter passing, return values, default arguments, inline functions, recursion, and function-based programming problems in C++.
4 Classes, Objects, Constructors, and Destructors Practical implementation of classes and objects, access specifiers, data members, member functions, default constructors, parameterized constructors, copy constructors, and destructors.
5 Encapsulation, Function Overloading, and Operator Overloading Implementation of encapsulation using access specifiers and implementation of function overloading and operator overloading to demonstrate compile-time polymorphism in C++.
6 Inheritance and Its Types Practical implementation of single, multiple, multilevel, hierarchical, and hybrid inheritance using base and derived classes. Students will explore access control, code reuse, and relationships between classes.
7 Midterm Review and Examination Review of C++ programming, classes, objects, constructors, destructors, encapsulation, function overloading, operator overloading, and inheritance, followed by the midterm laboratory examination.
8 Polymorphism and Virtual Functions Practical implementation of compile-time and runtime polymorphism using function overloading, operator overloading, function overriding, virtual functions, base-class pointers, and dynamic binding.
9 Abstraction and Abstract Classes Implementation of abstraction using abstract classes and pure virtual functions. Students will design programs that demonstrate abstract behavior, reusable class structures, and object-oriented design principles.
10 File Handling in C++ Practical implementation of file input and output using fstream, ifstream, and ofstream. Students will create, open, read, write, append, and process text and binary files.
11 Templates and Exception Handling Implementation of function templates and class templates for generic programming. Students will also implement exception handling using try, catch, and throw mechanisms to manage runtime errors.
12 Standard Template Library Practical use of the C++ Standard Template Library, including vectors, lists, stacks, queues, sets, maps, iterators, and standard algorithms for solving programming problems.
13 STL-Based Problem Solving and Project Development Application of object-oriented programming concepts and STL components to develop practical programming solutions. Students will solve programming problems and begin implementation of their final laboratory projects.
14 Final Project Implementation and Debugging Implementation, testing, debugging, and optimization of object-oriented programming projects. Students will apply appropriate concepts such as classes, inheritance, polymorphism, abstraction, file handling, templates, and STL.
15 Final Project Evaluation Evaluation of the final object-oriented programming project, including program functionality, code organization, object-oriented design, testing, documentation, and implementation quality.
16 Brainstorming and Problem Solving Intensive discussion, brainstorming, debugging, and problem-solving activities to strengthen C++ programming, object-oriented design, algorithmic thinking, and practical implementation skills.
17 Final Project Presentation, Viva, and Review Presentation and viva of laboratory projects, demonstration of program functionality, discussion of object-oriented concepts used, project design, implementation, testing, and comprehensive review of laboratory activities.