Accounting and Financial Management (3) Analog and Digital Communication (2) Artificial Intelligence (2) BE(Civil) (2) BE(CSE) (83) BE(ECE) (11) BE(Mech) (10) Business Processes (3) C# and .NET Framework (2) Communication Skills (1) Compiler Design (1) COMPONENT BASED TECHNOLOGY (1) COMPUTER ARCHITECTURE (1) COMPUTER GRAPHICS and MULTIMEDIA SYSTEMS (6) COMPUTER INTEGRATED MANUFACTURING (1) Computer Networks (9) Computer Organization (2) Computer Programming (1) Consumer Behaviour (1) Control Systems (1) Cryptography and Network Security (3) Datastructures and Algorithms (10) Datawarehousing and Mining (1) DBMS (5) DESIGN AND ANALYSIS OF ALGORITHMS (9) DESIGN OF MACHINE ELEMENTS (1) DIGITAL PRINCIPLES AND SYSTEMS DESIGN (3) Discrete Mathematics (1) DISTRIBUTED COMPUTING (2) DSP (8) DYNAMICS OF MACHINERY (2) Economic Foundations (1) ELECTRICAL ENGINEERING (1) ELECTRICAL ENGINEERING AND CONTROL SYSTEMS (1) Electromagnetic Fields (3) ELECTRONIC CIRCUITS (1) ELECTRONIC COMMERCE (4) ELECTRONIC DEVICES AND CIRCUITS (1) EMBEDDED SYSTEMS (1) FUNDAMENTALS OF COMPUTING (2) Graphics and Multimedia (3) HEAT AND MASS TRANSFER (1) HUMAN RESOURCE MANAGEMENT (1) Internet Programming (9) INTRODUCTION TO FINITE ELEMENT ANALYSIS (1) Legal Aspects of Business (1) MANAGEMENT INFORMATION SYSTEMS (1) Marketing Management (1) MATHEMATICAL FOUNDATIONS OF COMPUTER SCIENCE (4) MATHEMATICS - I (1) MBA (9) MCA (83) MCA QUESTION BANK (2) MECHATRONICS (1) MicroProcessor and Controllers (4) MICROPROCESSORS AND APPLICATIONS (5) MIDDLE WARE TECHNOLOGIES (3) MOBILE COMPUTING (5) NETWORK PROGRAMMING (1) NUMERICAL METHODS (1) OBJECT ORIENTED ANALYSIS AND DESIGN (5) Object Oriented Programming (18) Operating System (2) OPERATING SYSTEMS (9) Organizational Behaviour (2) POWER ELECTRONICS (1) Principles of Management (8) PROBABILITY AND QUEUEING THEORY (2) Probability and Statistics (1) PROBLEM SOLVING AND PROGRAMMING (2) PROCESS PLANNING AND COST ESTIMATION (1) PROFESSIONAL ETHICS AND HUMAN VALUES (1) RANDOM PROCESSES (1) RESOURCE MANAGEMENT TECHNIQUES (2) ROBOTICS (1) Security analysis (1) Service Marketing (1) SIGNALS AND SYSTEMS (1) Software Engineering (8) SOFTWARE PROJECT MANAGEMENT (4) SOFTWARE QUALITY MANAGEMENT (2) System Software (2) TCP/IP PROTOCOL SUITE (3) Theory of Computation (4) Total Quality Management (2) UNIX AND NETWORK PROGRAMMING (4) Visual Programming (2) WEB GRAPHICS (2) WEB TECHNOLOGY (2) XML AND WEB SERVICES (4)

Monday, June 23, 2008

object oriented programming

Third Semester(Regulation 2004)Computer Science and EngineeringCS 1204—OBJECT ORIENTED PROGRAMMING(Common to Information Technology )(Common to BE (Part-Time) Second Semester Regulation 2005)
Time : Three hours Maximum : 100 marks
Answer ALL questions
PART A—(10 x 2 = 20 marks)
1. What is object oriented paradigm?2. What is the use of scope resolution operator : : in C++?3. What are the operators of C++ that cannot be overloaded?4. How does constructor differ from normal functions?5. What is the default access mode for class members?6. What is an I/O stream?7. What is the type of class for which objects cannot be created?8. What is type of inheritance is supported in Java?9. What is java virtual machine?10. What is multithreading?
PART B—(5 x 16 = 80 marks)11. (a) (i) Explain object oriented paradigm with all its essential elements. (12)(ii) State the merits and demerits of object oriented methodology. (4)
(b) Explain the following concepts of object oriented programming in detail (i). Data abstraction(ii). Inheritance(iii). Polymorphism(iv). Objects
12. (a) (i) Write a C++ program to extract the elements placed in the odd position of the array. (8)
(ii) State the rules to the followed while overloading an operator. Write a program to illustrate overloading. (8)
(b) (i) Discuss about polymorphism and its advantages. (8)
(ii) Write a C++ program that will give the conditions of environment required, food habits and unique characteristics of pet animals fish and dog. Define a base class called pet that describe any common household pet; two derived classes called fish and dog with items specific to that type of animal. Write pure virtual functions in the base class for operations that are common to both types of animals. Write a program to test the usage of classes. (8)
13. (a) (i) Explain the 4 functions Seekg, Seekp, tellg, tellp used for setting pointers during file operation and show how they are derived from fstream class. (4)
(ii) Write a program to append to the contents of a file. (10)
(b) (i) Write a program to write the text in a file. Display the contents of file in reverse order. (8)
(ii) What are the keywords used in C++ for exception handling?Describe their usage with suitable example. (8)

14. (a) (i) Explain the interface concepts in Java. (8) (ii) Write a Java program to compute the area of rectangle and square using interface. (8)
(b) (i) Compare the features of C++ versus Java. (6)
(ii) Give an example that fits the following inheritance hierarchy. (10)
Write a Java program to implement this example.

15. (a) Explain about exception handling in Java with suitable examples. (16)
(b) What is a thread? State how synchronization is dealt while using multithreading. (16)