B.C.A 2017 OBJECT ORIENTED PROGRAMMING USING C++ BCA303T MODULE SPECIFICATION SHEET Course Outline The main objective of this course is to introduce students to the basic concepts of a selected language (such as C++) and the ability to write simple correct programs. Topics to be covered include: I/O, data types, function definition, visibility and storage classes, parameter passing, loops, arrays, pointers, strings, files, introducing classes and objects, constructors and destructors, function prototypes, private and public access, and class implementation. The practical part of this course is covered in the lab through exercises, practical assignments, and tutorials. Faculty Details Bhavya R Assistant Professor Department of BCA bhavyareddy@pes.edu PES DEGREE COLLEGE BANGALORE SOUTH CAMPUS Affiliated to Bangalore University
1. GENERAL INFORMATION Academic Year : 2017 Semester : III Title Code Duration Lectures 55 OBJECT ORIENTED BCA303T Seminars PROGRAMMING USING C++ Total: 55 2. PRE REQUIREMENT STATEMENT This is an under-graduate-level course on object oriented programming using c++ that assumes significant prior knowledge of students should already be familiar with aware about what is a computer program and what is a computer programming language. 3. COURSE RELEVANCE The course presents basics of C++ programming including: Basics of C++ environment, Data representation, Control structures, Functions, Arrays, Pointers, Strings, and Classes that aims to: 1. Arm the students with the basic programming concepts. 2. Introduce different techniques pertaining problem solving skills 3. Arm the students with the necessary constructs of C++ programming. 4. And to emphasis on guided practical sessions 4. LEARNING OUTCOMES Upon completion of this course, students should be able to: 1. Write clear, elementary C++ programs. 2. Understand algorithmic thinking and apply it to programming. 3. Understand problem-solving techniques. 4. Code with C++ arithmetic, increment, decrement, assignment, relational, equality and logical operators. 5. Code C++ control structures (if, if/else, switch, while, do/while, for) and use built-in data types. 6. Use standard library functions. 7. Write user-defined function definitions. 8. Understand and manipulate arrays. 9. Pass arrays to functions and pointers. Page 2 of 9
5. VENUE AND HOURS/WEEK All lectures will normally be held on VIII Floor. Lecture Sessions / Week : 6 6. MODULE MAP SESSION NO CHAPTER NAME 1 Introduction TOPICS TO BE COVERED 2 Procedure Languages, definition of OOP 3 Basic concept of OOP 4 Object Class, Data Abstraction 5 Data Encapsulation, Data Hiding, member functions 6 Reusability, Inheritance 7 Polymorphism, Overloading 8 Dynamic binding and Message passing. 9 Unit I C++ Features: The iostream class 10 Introduction C++ Comments, C++ Keywords 11 Variable declaration, The Const Qualifier 12 The Endl, Set Width precision, Manipulators, 13 The scope resolution operator, The new & delete Operations. Simple Functions, Function declaration, calling the function, function 14 definition, Passing argument to, returning value from function, passing constants, 15 Variables, 16 pass by value, passing structure variables, pass by reference Default arguments, return statements, return by reference, overloaded 17 functions Different number of arguments, Different Kinds of argument, inline 18 function 19 Objects & Classes: Classes & Objects, Class Declaration 20 Class member; Data Constructions, Destructors, 21 Member functions, Class member visibility, pivate, public, protected. 22 Unit - II The scope of the class objects constructions 23 Objects & Classes Default Constructor. Constructor with argument, 24 constructor with default arguments Page 3 of 9
25 Dynamic constructor, copy constructor, Overloaded constructor, Objects as arguments returning objects from 26 functions 27 class conversion, manipulation private Data members 28 Array of objects, string as class member 29 Operator Overloading : Overloading unary operator 30 Operator Keyword, Operator arguments, 31 Operator return value, Nameless temporary objects 32 Unit - III limitations of increment operator, overloading binary operator Operator 33 Overloading arithmetic operators, comparison operator, arithmetic assignment operator 34 data conversion; conversion between objects of different classes. 35 Specifying the Derived class accessing Base class members 36 Derived class constructor, Overriding member functions, 37 public and private inheritance; Access Combinations, Classes & Structures, Access Specifiers, Level of inheritance; Multilevel,Hybrid Multiple 38 inheritance; 39 member functions &constructors in multiple inheritance, Containership 40 Classes, within classes, Inheritance & Program development. 41 Virtual functions: Normal member function accessed with pointers, 42 Dynamic binding, pure virtual functions, 43 Unit - IV Friend function; Friends for functional notation, friend classes, the pointer; 44 Virtual functions Accessing Member Data with this, using this for returning values. 45 Templates & Exception Handling: Templates, Class & function templates development for reuse: Generator based reuse, Application System 46 Portability. 47 Member function templates, Template arguments, Exception Handling. 48 Streams The Stream class Hierarchy, Stream classes Header file, Unit - V string I/O: Writing strings, reading strings, character I/O, Detecting End of 49 file. 50 Streams Object I/O; writing an object to disk, reading an object from disk 51 I/O with multiple objects; the fstream class, The open function 52 File Pointers; Specifying the position, 53 Specifying the offset,the tellg function 54 Disk I/O with Memory Functions 55 Closing Files, Error Handling, Command Line Arguments Page 4 of 9
7. RECOMMENDED BOOKS/JOURNALS/WEBSITES A. PRESCRIBED TEXTBOOK 1. Lafore Robert, Object Oriented Programming in Turbo C++, Galgotia Publications, 2012 B. REFERENCE BOOKS 1. Lippman, C++ Primer, 3rd Edition, Pearson Education, 2010. 2. E. Balaguruswamy: Object Oriented Programming with C++, Tata McGraHill Publications, 2011. 3. Farrell, Object Oriented Programming Using C++, 1st Edition 2008,Cengage Learning India C. WEBSITES / ONLINE REFERENCES a. www.tutorialspoint.com/cplusplus/ b. www.e-booksdirectory.com c. www.cplusplus.com/files/tutorial.pdf d. www.cplusplus.com/doc/tutorial/ 8. ASSIGNMENT(S) 1. ASSIGNMENT 01 A) Differentiate between procedure oriented and object oriented programming. B) Define the following terms: Class Object Inheritance Polymorphism Encapsulation 2. ASSIGNMENT 02 A) Describe any three manipulators. B) What is Scope Resolution Operator? What are various use of it? 3. ASSIGNMENT 03 A) What is data member and member functions of class? B) Explain the static data members, static member functions and their use. 4. ASSIGNMENT 04 A) Explain Access specifiers in detail. B) Explain five types of Inheritance. 5. ASSIGNMENT 05 A) Explain call-by value, call-by address and call-by reference with example. B) Explain data conversion between derived data types with example. 6. ASSIGNMENT 06 What is Inline function? What is template? What is this Pointer? What is Abstract Class? Page 5 of 9
What are Virtual Functions? What are Base and Derived classes? 10. THEORY ASSESSMENT A. WRITTEN EXAMINATION The Theory Examination is for 100 Marks which will be held for duration of 3 Hrs. The Scheme and Blue Print will be released to the students once the Bangalore University releases it. B. CONTINUOUS ASSESSMENT The Continuous Assessment is conducted as per the following parameters. Parameter WEIGHTAGE 22 % Internal Test 50 75% 16.5 Assignment 10 12.5% 2.75 Class Test 10 12.5% 2.75 Total 70 100% 22 The students are hereby required to note that every internal test weightage will calculated for 12 Marks. This includes timely submission of assignments and attending class tests as conducted. The Sum of Best Two Performances in Internal Terms will be taken. Parameter Internal Test 01 22 Internal Test 02 22 Internal Test 03 22 Final Internal Marks(Sum of Best Two Marks Of The Three Internal Tests) Attendance >95 % : 06 Marks 90-95 % : 05 Marks 44 06 Page 6 of 9
85-90 % : 04 Marks 80-85 % : 03 Marks 75-80 % : 02 Marks Total 50 11. ASSESSMENT / ASSIGNMENT / CLASS TEST / ACTIVITY PLANNER Week 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Internal Test T1 T2 T3 Assignments Submission A1 A2 A3 A4 A5 A6 Class Test C1 C2 C3 LAB Record Submission LAB Programs Schedule LAB Test Schedule LT LR LT Legend Meaning Test Topics Examinable T1, T2,T3 Internal Tests T1 Class 1 16 LT Lab Tests T2 Class 17 32 A1, A2, A3, A4, A5, A6 Assignment s T3 Class 33 52 C1,C2,C3 Class Test LT Problems 1 16 12. QUESTION BANK UNIT-1: Introduction to C++ 1. Describe the following characteristics of OOP i.encapsulation ii.polymorphism, iii.inheritance 2.Discuss function prototyping, with an example. Also write its advantage. 3.Write the general form of function. Explain the different types of argument passing techniques with example. Page 7 of 9
4. Define the this pointer, with an example, indicate the steps involved in referring to members of the invoking object. 5. Discuss the issues of procedure oriented systems with respect to object oriented systems? 6. Why C++ introduced reference variable? 7. Give the comparison of C and C++ with examples.. 8. What are pointers explain with an example.. 9. What is function overloading give example?. 10. Differentiate between procedure oriented and object oriented programming. 11. Explain inline functions? UNIT-2: Classes &Objects 1. Write a C++program t o count the number of objects of a certain class. 2. What is a class? How is it created? Write an example class. 3. What are constructors? How are they different from member functions? 4. What are static data members? Explain with an example what the use of static data members. 5. Demonstrate with C++ program for i) Passing objects to functions ii) Returning objects 1. Explain the features of new and delete? 2. What is the benefit of copy constructor? Explain the necessity of defining your own copy constructor? 3. What is a friend function? Why is it required? Explain with an example. 4. What is the use of operator overloading? Write a program to overload post and pre increment operators. 5. Explain Generic function with example. UNIT-3: Operator Overloading &Inheritance 1. Explain different types of inheritance with block diagram and an example for each 2. What is the ambiguity that arises in multiple inheritance? How it can be overcome. Explain with example. 3. Discuss with examples, the implications of deriving a class from an existing class by the public and protected access specifiers. 4. Write a c++ program to initialize base class members through a derived class constructor. 5. What is inheritance? How to inherit a base class as protected? Explain it in Multiple base classes? 6. With an example explain, multiple base class inheritance? UNIT-4 Virtual Functions 1. What is a virtual table? How does the implementing dynamic polymorphism. Explain with an example. 2. What is the need of virtual function? With an example, explain overriding of Member function of base in derived class? 3. What is the virtual destructor? 4. List the library classes that handle streams in c++. 5. When Constructors and Destructors Are Executed. Page 8 of 9
6. Explain Granting Access. 7. What are virtual functions. What is the use. Give an example. 8. Describe briefly with a figure, class hierarchy provided by c++for stream handling. 9. Define and give the syntax for the following. a) Virtual function b) Pure Virtual function c) Abstract Base Class 1. Explain error handling and manipulators in c++? 2. Why friend f unction is required to overload binary operators? 3. What are the rules for overloading operators? 4. Write the difference between Early and Late Binding. 5. Explain Pure Virtual Functions. 6. Explain Calling a Virtual Function Through a Base Class Reference. 7. What are the rules for overloading the operator? 8. Define a class Date, use overloaded+ operator to add two dates and display the result. Assume non leap year dates. UNIT-5: I/O System Basics, File I/0 1. Demonstrate overloading of assignment operator in c++? Explain C++Stream Classes. 3. Explain Formatted I/O. 4. Explain File operations. 5. Explain new and delete operators overloading in c++ with examples? Exception Handling 1. What are the new style cast operators explain the syntax of these operators with example? 2.What are class templates.? How are they created? What is the need for class templates? Create a template for bubble sort functions. 3. Explain the C++style solution for handling exceptions 4. Explain try catch and throw exception handling in c++ 5. Explain different types of type conversion. Page 9 of 9