Introduction to Object Oriented Programming:
Computer programming background-C++ overview. First C++ Program -Basic C++ syntax, Object Oriented Programming: What is an object, Classes, methods and messages, abstraction and encapsulation, inheritance, abstract classes, polymorphism.
Textbook 1: Chapter 1(1.1to 1.8)
Functions in C++:
Tokens –Keywords –Identifiers and constants –Operators in C++ –Scope resolution operator –Expressions and their types –Special assignment expressions –Function prototyping –Call by reference –Return by reference –Inline functions -Default arguments –Function overloading.
Textbook 2: Chapter 3(3.2,3.3,3.4,3.13,3.14,3.19, 3.20) , chapter 4(4.3,4.4,4.5,4.6,4.7,4.9)
Inheritance & Polymorphism:
Derived class Constructors, destructors-Types of Inheritance-Defining Derived classes, Single Inheritance, Multiple, Hierarchical Inheritance, Hybrid Inheritance.
Textbook 2: Chapter 6 (6.2,6.11) chapter 8 (8.1 to,8.8)
I/O Streams:
C++ Class Hierarchy-File Stream-Text File Handling-Binary File Handling during file operations.
Textbook 1: Chapter 12(12.5) , Chapter 13 (13.6,13.7)
Exception Handling:
Introduction to Exception -Benefits of Exception handling-Try and catch blockThrow statement-Pre-defined exceptions in C++
Textbook 2: Chapter 13 (13.2 to13.6)
Course outcome (Course Skill Set)
At the end of the course the student will be able to:
CO1Able to understand and design the solution to a problem using object-oriented programming concepts.
CO2Able to reuse the code with extensible Class types, User-defined operators and function Overloading.
CO3Achieve code reusability and extensibility by means of Inheritance and Polymorphism
CO4Implement the features of C++ including templates, exceptions and file handling for providing programmed solutions to complex problems.
Programming Assignments:
1. Write a C++ program to sort the elements in ascending and descending order.
2. Write a C++ program to find the sum of all the natural numbers from 1 to n.
3. Write a C++ program to swap 2 values by writing a function that uses call by reference technique.
4. Write a C++ program to demonstrate function overloading for the following prototypes.
add(int a, int b)
add(double a, double b)
5. Create a class named Shape with a function that prints "This is a shape". Create another class named Polygon inheriting the Shape class with the same function that prints "Polygon is a shape". Create two other classes named Rectangle and Triangle having the same function which prints "Rectangle is a polygon" and "Triangle is a polygon" respectively. Again, make another class named Square having the same function which prints "Square is a rectangle".Now, try calling the function by the object of each of these classes.
6.Suppose we have three classes Vehicle, FourWheeler, and Car. The class Vehicle is the base class, the class FourWheeler is derived from it and the class Car is derived from the class FourWheeler. Class Vehicle has a method 'vehicle' that prints 'I am a vehicle', class FourWheeler has a method 'fourWheeler' that prints 'I have four wheels', and class Car has a method 'car' that prints'I am a car'. So, as this is a multi-level inheritance; we can have access to all the other classes methods from the object of the class Car. We invoke all the methods from a Car object and print the corresponding outputs of the methods.So, if we invoke the methods in this order, car(), fourWheeler(), and vehicle(), then the output will be
I am a car
I have four wheels
I am a vehicle
Write a C++ program to demonstrate multilevel inheritance using this.
7. Write a C++program to create a text file, check file created or not, if created it will write some text into the file and then read the text from the file.
8.Write aC++ program to write and read time in/from binary file using fstream
9. Write a function which throws a division by zero exception and catch it in catch block. Write a C++ program to demonstrate usage of try, catch and throw to handle exception.
10. Write a C++ program function which handles array of bounds exception using C++.
Assessment Details (both CIE and SEE)
Continuous Internal Evaluation(CIE):
Two Unit Tests each of20 Marks (duration 01 hour)
One Improvement test before the closing of the academic term may be conducted if necessary. However best two tests out of three shall be taken into consideration.
Two assignments each of 10 Marks
The teacher has to plan the assignments and get them completed by the students well before the closing of the term so that marks entry in the examination portal shall be done in time. Formative (Successive) Assessments include Assignments/Quizzes/Seminars/ Course projects/Field surveys/ Case studies/ Hands-on practice (experiments)/Group Discussions/ others. . The Teachers shall choose the types of assignments depending on the requirement of the course and plan to attain the Cos and POs. (to have a less stressed CIE, the portion of the syllabus should not be common /repeated for any of the methods of the CIE. Each method of CIE should have a different syllabus portion of the course). CIE methods /test question paper is designed to attain the different levels of Bloom’s taxonomy as per the outcome defined for the course.
The sum of two tests, two assignments, will be out of 60 marks and will be scaled down to 30 marks
CIE for the practical component of the Integrated Course
Scaled-down marks of write-up evaluations and tests added will be CIEmarks for the laboratory component of IPCC for 20 marks.
Semester End Examination (SEE):
SEE for IC
Theory SEE will be conducted by University as per the scheduled time table, with common question papers for the course (duration 03 hours)
1.The question paper will have ten questions. Each question is set for 20 marks.
2.There will be 2 questions from each module. Each of the two questions under a module (with a maximum of 3 sub-questions), should have a mix of topicsunder that module.
3.The students have to answer 5 full questions, selecting one full question from each module.The theory portion of the Integrated Course shall be for both CIE and SEE, whereas the practical portion will have a CIE component only. Questions mentioned in the SEE paper shall include questions from the practical component).
Passing standard:
Suggested Learning Resources:
Books (Title of the Book/Name of the author/Name of the publisher/Edition and Year)
Textbooks
1. Bhushan Trivedi, “Programming with ANSI C++”, Oxford Press, Second Edition, 2012.
2. Balagurusamy E, Object Oriented Programming with C++, Tata McGraw Hill Education Pvt.Ltd , Fourth Edition 2010.