| Looking for new friends? Find one today at Asuku.com |
|
Home / Test Papers / IGNOU / CC16 Introduction To C++ CC16 Introduction To C++ December 2005 | Ask a question Print this page |
BACHELOR IN COMPUTER APPLICATIONS
Term-End Examination
December, 2005
CC16 (S) : INTRODUCTION TO C++
Time: 2 hours
Maximum Marks: 60
1. (a) There is a bridge called XYZ. Anybody who travels by vehicle on the bridge needs to pay tax at the exit point. The charges are Rs. 50/-, Rs. 100/- and Rs. 150/- for a two-wheeler, a three wheeler and a four-wheeler respectively.
Every day at 10 PM, they count the number of vehicles travelled till that time. Also, they count the tax collected separately for all the categories. This work is done manually. Now, design appropriate classes for the Tax calculation system, including constructors, destructors and member functions. Write a main( ) function to display the information required.
Make assumptions, wherever necessary. (15)
(b) Explain the use of "?" operator in C++ programs, with an example. (5)
(c) Explain at least one advantage of a virtual function, with the help of an example. (5)
(d) Does C++ support modular programming ? Justify your answer. (5)
2. (a) Write a constructor that is capable of using the current-time from the time( ) function declared in the C standard library header "time.h" to initialize an object of a C++ class. (7)
(b) Write a progmm in C++ that accepts two strings 51 and 52 as input and checks whether 51 is a substring of 52. It should print appropriate messages. Don't use any library function for checkng for the substring. Define appropriate classes. (8)
3. (a) Write five reasons that justify the statement "C++ is an Object Oriented Programming Language". (5)
(b) Write at least two differences between Class templates and Function templates. (5)
(c) Define Multiple Inheritance. Write an example program using multiple inheritance. (5)
4. (a) Define exception handling in C++. With the help of an example explain the concept of exception handling. (5)
(b) "Overloading is a type of polymorphism." With the help of an example program for each explain the function overloading and operator overloading concepts. (10)
5. (a) Write a program for sorting a list of numbers in C++. (8)
(b) Write a program in C++ to add two complex numbers. Use appropiate classes including the constructors, destructors and member functions. (7)
Business Schools - Engineering Colleges - Medical & Nursing Admissions - BEd in Distance mode - Journalism & Media Studies - Forensic Science
Enter a detailed keyword. Ex: Question Papers of IGNOU MCA Ist Semester