Solution to 18CS45 OOC Module 2 Question Bank

Solution to 18CS45 OOC Module 2 Solved Question Bank

Here you can find the solution to 18CS45 OOC Module 2 Question Bank.

1. Write a C++ program to get the employee details (empno, empname, bsalary (initialized to 1000 by constructor) and allowance) of the Employee class through keyboard using the method GetData() and display them using the method DispData() on the console in the format empno, empname, bsalary,allowance. VTU : July-18, Marks 8

2. What is a constructor? List the different types of constructors and explain the default constructor with an example. Jan.-18, Marks 6

3. What is constructor? Mention its types. Explain parameterized constructor with an example.  Jan.-19, Marks 6

4. What is a constructor? Mention its type. Explain the parameterized constructor with a suitable code.  July-19, Marks 8

5. Write a C++ program to define an Employee class with the following Members: Data  Members: empid, emp salary Member Functions: to read a data and to print the data. The program should use an array within the class to read 3 employee information and print the 3 employee information.

See also  Python Application Programming 18EC646 / 18CS752 VTU CBCS Notes

6. Discuss briefly the concept of byte code in Java. July-18, Marks 4

7. Elucidate how Java is a platform independent language, with neat sketches. July-18, Marks 6

8. Define byte code. How does it help Java program(s) achieve portability?  Jan.-19, Marks 5

9. Describe the concept of byte code.  July-19, Marks 4

10. How “compile once and run anywhere” is implemented in JAVA? Discuss.  July-17, Marks 4

11. List and explain the Java buzzwords.  July-17, 19, Jan.-19 Marks 8

12. Explain how Java is robust and interactive.  Jan.-18, Marks 5

13. Explain the structure of Java program and its keywords with an example. July-18 Marks 10

14. Write Java program to initialize and display different types of integer and floating point variables. Jan.-18, Marks 6

15. Explain the operation of the following operators with example.  Jan 18 Marks 6

i) % ii) >>> il) &&

16. With an example, explain in working of >> and >>> (unsigned right shift). Jan 19 Marks 4

See also  18CS741 Digital Image Processing Notes

17. List the different types of operators. Explain any three.   July 19 Marks 8

18. Explain the concepts of arrays in Java with examples. Also, write a program that creates and initializes a four integer elements array. Find the sum and average of its values. July-17, Marks 8

19. How to declare two dimensional arrays in java? Explain with simple example. Jan.-18, Marks 4 

20. How arrays are defined in Java? Explain with an example. July-18, Marks 4

21. Explain switch case with an example. July-19, Marks 6

22. Write a Java program to find the factorial of a number ‘n’ using for loop. Jun.-18, Marks 6 

23. Write a java program to find the sum array elements. Jan.-18, Marks 5

24. Define type casting. Explain with an example. July 2017, Jan 19 Marks 5

25. Define type casting. Illustrate with an example. What is the mean by automatic type conversion? Jan 18 Marks 6

26. Write a Java program to print first ‘n’ Fibonacci numbers.

See also  2018 Scheme 3 Sem CSE VTU CBCS Notes

27. Write a Java program to reverse a given number.

28. Write a Java program to find the number of and the sum of all numbers greater than 100 and less than 200 (inclusive both) which are divisible by 7.

29. List and explain control statements in java.

The solution to 18CS45 OOC Module 1 Solved Question Bank

The solution to 18CS45 OOC Module 2 Solved Question Bank

The solution to 18CS45 OOC Module 3 Solved Question Bank

The solution to 18CS45 OOC Module 4 Solved Question Bank

The solution to 18CS45 OOC Module 5 Solved Question Bank

18CS45 Object-Oriented Concepts VTU CBCS Notes

Summary:

This article provides the solution to the 18CS45 OOC Module 2 Solved Question Bank. If you like the tutorial share it with your friends. Like the Facebook page for regular updates and YouTube channel for video tutorials.