Home / Object Oriented Programming / Object Oriented Programming Questions

Object Oriented Programming Questions

Describe the differences between Structured Programming Vs OOP? Which is the better technique and why?

Write C++ program following the proper rule of OPP that declares variable to hold the letter grades (A,B,C, D and F) and Grade points (4.0,3.5,3.0,2.0, and 0.0) which a student can get in any course. Prompt the user to enter the letter. Then read it in, and echo it with the grade point of the letter.

What is the benefit of java as OPP language?

Write a simple java class that will produce an output “First Java TEST’ using simple output dialogue box.

What are the basic steps for compiling and running a simple java program?

What is constructor in C++? Describe the rules of using constructor with proper example.

Write the differences between constructor & copy constructor.

Write the situations when copy constructor must be used. Explain the problem which may occur if we do not use copy constructor in any of those situation.

Explain the use of this  pointer in C++. Provide necessary explanation with proper example C++ code.

What is the functional difference between following two cases if we use user-defined function?

Passing value of a variable.

Passing object of  a class.

Explain friend function of C++.  Write the basic structure of declaring a friend function.

Why friend functions are used in Operator Overloading? Show the << operator overloading with friend function.

What is const qualifier? Write the use of this qualifier in C++?

What scope of a variable? Explain with proper example.

What is C++STL? How it increases program solving capability?

Is it possible to use default argument without using function overloading in C++?

If your name is “Sakib” then create a C++ manipulator named “ManipbySakib” which can add a string “This is generated by manipulator of Shakib” before each output stream. Give appropriate C++ code to test this manipulator.

Which OOP mechanism will you use, and why?

How it will help to make more clean and effective code?

Is there any benefit to improve the efficiency of software if you use your proposed technique?

Is it possible to use virtual class or virtual function in this project? Explain the reason of your opinion.

Write the basic declaration of the C++ class you will implement.

English the key differences between C++ and Java as object-oriented programming language.

Consider the following problem ne3eded to implement by object oriented programming (OPP). Prior to implement this, your task is to model the problem the  features of the object oriented programming that will help the programmers to code effectiuiently.

Problem Statement: Develop a graphic editor that can draw different geometric shapes such as line circle and triangle. User can select move or rotate a shape. To do so, editor provides user with a menu listing different commands. Individual shapes can be grouped together and can behave as it single shape.

Which rules should be followed for using member and friend functions for overloading whether a unary and a binary operator in C++?

Mention the benefits of using the following concepts in object-oriented programming.

(i) Function overloading         (ii) Constructor            (iii)Destructor (iv) Copy constructor (v)  Opertor overloading

Write a C++ program to implement   sort (() and merge () algorithms which are available  in C++ standard template library (STI).

Clearly mention the rules for getting the properties by the derived class when a class is nherited using the visibility models as private public and protected.

What is ambiguity resolution occurred in inheritance? How can it be solved?

What is Java bytecode? What are the basic steps for compiling and running a simple Java program in command mode?

Discuss the collaboration of try throw and catch for exception handling in C++.

Write a C++ program  to implement a vector container in the STI, supported by C+. Also show the use of various kinds of member functions supported by the container. Show sample input outpurt case (s) for your written program.

Why is Java known as platform-independent programming language? Explain with proper interpretation.

When should you declate a class as virtual? How can dynamic binding be achieved in OPP?

How can you use a file, for example text, binary, etc. for I/O in C++? IIlustrate your answer along with class and object concepts.. Show sample input-output case (s) for your written program.

Mention the drawbacks of structured programming paradigms. How can the drawbacks be resolved by Object Oriented Programming (OOp) paradigms?

Consider the following problem needed to implemkent by one of the OPP language. Prior to implement this, your task is to model the solution of the problem (step-by-step) using the features of OPP that helps the programmers to code the solution efficiently.

Problem Statement: Considering the following statements, develop the central database management softare for Haje Mohammad Danesh Science and Technology University, Dinajpur.

  1. i) The University contains many faculties, each of which has also more than one constituent departments.

iii) Each department can offer any number of courses.

iii) Many department can work in a department.

  1. iv) A teacher can work only in one department
  2. v) For each department there is a Chairman
  3. vi) A teacher can only be a Chairman

vii) Each teacher can conduct any number of courses

viii) A course can be conducted by only one teacher

  1. ix) A student can enroll for any number of courses
  2. x) Each course can have any number of students
  3. xi) Each teacher can process the result of his/her conducted course (s) for all the students who take that course (s)

Clearly mention the rules for getting the properties by the derived class when a class is inherited using the visibility mode as private, public and protected.

Enlist the benefit (s) of using the following concepts im OPP:
i) Overloading             ii) Constructor and Destructor

Write a  C++ program to show the implementation of sort 0 and merge 0 algorithms from C++ standard template library (STL). Show sample input-output case (s) for your written program.

What is this pointer? Write a code segment in C++ to illustrate the benefit (s) of using this pointer.

Define ambiguity resolution in inheritance. How can it be fixed in C++?

Mention the rules of using construction in inheritance. Write a C++ program that illustrates the use of I/O files in a class.

What is Java byte-code? What are the basic steps for compiling and running a simple Java program in command mode?

Explain ios class function and manipulator. Write a Java program to implement the concepts of classes and objects.

Briefly  discuss the following concepts used in OPP:

i) Hierarchical inheritance and static member function

  1. ii) Abstract class and template

How run-time function overeloading can be achieved in C++?

Write a C++ program to implement a list container from the C++ STL. Also show the use of various kinds of member functions supported by the container as well as some available algorism. Show sample input-output case (s) for your written program (you can use line number of your code better explanation).

Why is Java known as a platform-independent programming language? Explain with proper reason (s)

Explain the insertion and extraction operators in C++ with the help of an example.

Prove that class can be used as a build-in data type considering the concept of either copy constructor or operator overloading. You are recommended to use C++ programming language for the same.