III CSE CS3391 OOP QB Unit1
III CSE CS3391 OOP QB Unit1
2 marks
1. Define Object Oriented Programming
Object-Oriented Programming (OOP) is a programming paradigm based on the concept of
"objects", which can contain data, in the form of fields (often known as attributes/data
members/properties), and code, in the form of procedures (often known as
functions/methods).
6. Define Abstraction.
Abstraction refers to the act of representing the essential features without including the
background details or explanations. It reduces the complexity and increases the efficiency. Small
programs can be easily upgraded to large programs. Software complexity can easily be
managed.
7. What is Polymorphism?
Polymorphism is the ability to take more than one form and refers to an operation
exhibiting different behavior instances. Object oriented programs use polymorphism tocarry
out the same operation in a manner customized to the object.
CS3391_OOP_QB
9. Write the syntax for declaration of class and creation of objects?
//Syntax for class
class ClassName{
Access-specifier datatype datamember(s);
Access-specifier method-declaration(s)/definition(s) }
//Syntax for object
ClassName objectName=new ClassName();
12. What is Constructors in Java? What are its types? (Nov/Dec 2020)(Apr/May 2021)
A constructor is a special method that is used to initialize an object. The name of the
constructor and the name of the class must be the same. A constructor does not have any return
type.
There are two types of Constructor
Default Constructor – constructor without argument Parameterized constructor – constructor
with argument
CS3391_OOP_QB
16. Can a java Source file be saved sing a name other than the class
name?Justify.
Yes, you can save your java source code file with any other name, not same as your main
class name but when you comiple it than byte code file name will be same as your main
class name.
CS3391_OOP_QB
UNIT-I / PART-B
(i) Explain the characteristics of OOPs (Nov/Dec 2018)
(ii) Explain the features and characteristics of JAVA(Nov/Dec 2019)
i) Describe the typical java program structure.
ii) Explain the general java program compilation and execution.
What are the different data types in JAVA? Explain each of them with example.
What is Constructor in JAVA? Explain the different types of Constructor?
Discuss in detail the access specifiers available in Java.
What are the different access specifiers and explain them in detail.
Explain Constructors with examples.
Explain in detail the various operators in Java.
Explain the concepts of arrays in Java and explain its types with examples?
Explain in detail about static variable and static method in Java with example?
Discuss the three OOPS principles in detail.(Apr/May 2019)
What are literals? Explain the types of literals supported by Java.(Apr/May 2019)
Explain the Selection statements in Java with suitable examples.(Apr/May 2019)
Write a Java code using do-while loop that counts down to 1 from 10 printing exactly ten
lines of ―hello‖.(Apr/May 2019)
Write in detail about different access specifiers with example program.
Develop a java program to find the smallest number in the given array by creating one
dimensional array and two dimensional array using new operator.(Nov/Dec 2019).
(i) What is a method? How method is defined? Give example (Nov./Dec.2018)
(ii) State the purpose of finalize() method in java. With an example explain how
finalize() method can be used in java program
What are the three categories of control statements used in Java? Explain each category
with example. (Nov/Dec 2020)(Apr/May 2021)
CS3391_OOP_QB