Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

OBJECT-ORIENTED PROGRAMMING TEST QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
10
Grade
A+
Uploaded on
10-01-2025
Written in
2024/2025

OBJECT-ORIENTED PROGRAMMING TEST QUESTIONS AND ANSWERS...

Institution
OBJECT-ORIENTED PROGRAMMING
Course
OBJECT-ORIENTED PROGRAMMING

Content preview

OBJECT-ORIENTED PROGRAMMING TEST
QUESTIONS AND ANSWERS


What is OOPS? - ANSWER OOPS- Object Oriented Programming system in
which programs are considered as a collection of objects. Each object is nothing
but an instance of a class.


Write basic concepts of OOPS? - ANSWER Abstraction.
Encapsulation.
Inheritance.
Polymorphism.


What is a class? - ANSWER A class is simply an appearance of any kind of
object. It is a blueprint/plan/template that defines details about an object.


What is an object? - ANSWER An object is an instance of a class. It has its
own state, behavior, and identity.


What is Encapsulation? - ANSWER Encapsulation is an attribute of an object,
and it contains all data which is hidden. That hidden data can be restricted to the
members of that class.


Levels are Public, Protected, Private, Internal and Protected Internal.

, What is Polymorphism? - ANSWER Polymorphism is nothing but assigning
behavior or value in a subclass to something that was already declared in the
main class. Simply, polymorphism takes more than one form.


What is Inheritance? - ANSWER Inheritance is the concept where one class
shares the structure and behaviour defined in another class. If inheritance
applied on one class is called Single Inheritance, and if it depends on multiple
classes, then it is called multiple Inheritance.


What are manipulators? - ANSWER Manipulators are the functions which can
be used in conjunction with the insertion (<<) and extraction (>>) operators on
an object. Examples are endl and setw.


Define a constructor? - ANSWER A constructor is a method used to initialize
the state of an object, and it gets invoked at the time of object creation. Rules
for constructor are:


- The name of Constructor should be the same as that of class name.
- A constructor does not have any return type.


Define Destructor? - ANSWER A destructor is a method which is
automatically called when the object is made of scope or destroyed. Destructor
name is also the same as class name but with the tilde symbol before the name.


What is an Inline function? - ANSWER An inline function is a technique used
by the compilers and instructs to insert complete body of the function wherever
that function is used in the program source code.

Written for

Institution
OBJECT-ORIENTED PROGRAMMING
Course
OBJECT-ORIENTED PROGRAMMING

Document information

Uploaded on
January 10, 2025
Number of pages
10
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • oop
  • what is oops
$11.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
luzlinkuz Chamberlain University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1566
Member since
4 year
Number of followers
854
Documents
31276
Last sold
1 day ago

3.8

322 reviews

5
140
4
63
3
62
2
17
1
40

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions