Está en la página 1de 5

ANNA UNIVERSITY : CHENNAI 600 025 B.E. / B. Tech. DEGREE EXAMINATIONS, OCT. /NOV.

. - 2013 Regulations 2008 Fifth Semester Common to B.E. ELECTRICAL AND ELECTRONICS ENGINEERING / B.E. ELECTRONICS AND INSTRUMENTATION ENGINEERING / B.E. INSTRUMENTATION AND CONTROL ENGINEERING CS2312 - OBJECT ORIENTED PROGRAMMING LABORATORY Time: 3 hours Max. marks:100

1. a) Write a C++ program to multiply six numbers using default arguments. (50) b) Write a JAVA program with three threads named as one, two, three and initiate these threads from the main thread and show the result. (50)

2. a) Write a C++ program to perform addition of four numbers function overloading. (50) b) Write a JAVA program to illustrate multiple inheritances for student details. (50)

3. a) Write a C++ program to find the sum of 5 numbers using Default arguments. (50) b) Write a JAVA program with three threads named as A, B, C and initiate these threads from main thread and show the result. (50)

4.

a) Write a C++ program for implementing the concept of Template using bubble sort.(50) b) Write a JAVA program to generate employee payroll using interface. (50)

5. a) Write a C++ program to find the greatest of 4 numbers for Class Design using Namespaces & Objects Creations. (50) b) Write a JAVA program with two packages namely increment and relational operators and import these packages in a main class and show the result. (50)

6. a) Write a C++ program to get and display the details of a student name and register number in a class and age, branch and hobby in another class using single inheritance. (50) b) Write a JAVA program to get and display the details of staff name and designation in a class, department, salary in another class and awards in the third class using interfaces and Inheritance. (50)

7. a) Write a C++ program allocation.

to perform the string concatenation using dynamic memory (50)

b) Write a JAVA program to implement the exception handling for dividing 2 numbers. (50)

8. a) Write a C++ program to generate Fibonacci series using constructor and destructor. (50) b) Write a JAVA program with two packages namely decrement and arithmetic operators and import these packages in a main class and show the result. (50)

9. a)Write a C++ program to perform complex number subtraction by overloading an operator using friend function. (50) b) Write a JAVA program with three threads named as P, Q, R and initiate these threads from main thread and show the result. (50)

10.a)Write a C++ program to reverse the given number and assign it to a variable by overloading the appropriate operator. (50) b) Write a JAVA program to handle division by zero exception. (50)

11. a) Write a C++ program to handle division by zero exception. (50) b)Write a JAVA program with a class named as circle that implements an interface named as circleinterface and define the methods named as area and circum in the class to find the area and circumference of the circle. (50)

12. a)Write a C++ program to calculate student percentage by inheriting the personal details from the base class to the derived class. (50) b)Write a JAVA program for handling Arithmetic exception. (50)

13. a)Write a C++ program with two classes named as add, sub to perform addition and subtraction of two given numbers and inherit these values to another class named as remainder to find the remainder of these values. (50) b) Write a JAVA program to find the square and cube of a number using class and object. (50)

14. a)Write a C++ program to sort 5 numbers using STL. (50) b) Write a JAVA program with a class named as area to find the area of the room and inherit this property into another class named as volume to find out the volume of the same room and display both the results. (50)

15. a) Write a C++ program to perform subtraction of two numbers using function overloading. (50) b) Write a JAVA program with a class named as rectangle to find the area of rectangle and inherit this area into another class named as cuboid to find the area of the cuboid. (50)

16. a) Write a C++ program to perform complex number addition by overloading an operator using friend function. (50) b) Write a JAVA program to find the area of rectangle and circle using class and object. (50)

17.a) Write a C++ program with two classes named as one, two to find the area of square and rectangle respectively, and inherit these values to another class named as cuboid with its own property height to find the area of the cuboid. (50)

b) Write a JAVA program to find the prime numbers of a given number using class and object. (50)

18. a) Write a C++ program to find the cube of a given numbers of different data types using single function as a template type and display the result. (50)

b) Write a JAVA program to implement the concept of I/O by getting item code number, item name, quantity and cost and displaying the total amount for that item. (50)

19. a)Write a C++ program to interchange two numbers of different data types in each function using function overloading. (50)

b) Write a JAVA program to write a company profile into a file and read the contents from the file and display it. (50)

20. a) Write a C++ program with the class name one and two to get the personal and mark details of a student respectively and create a class three that inherits the properties of one and two to calculate the average mark obtained by that student. (50)

b) Write a JAVA program to find the factorial of a given number using class and object. (50)

También podría gustarte