0% found this document useful (0 votes)
5 views13 pages

Object Oriented Programming OOPs - CS3391 - Important Questions With Answer2 - Unit 1 - Introduction To OOP and Java

The document outlines the curriculum for a Bachelor of Engineering in Computer Science and Engineering at Anna University, including various subjects across eight semesters. It details core subjects such as Object Oriented Programming, Data Structures, and Artificial Intelligence, along with elective options. Additionally, it includes a question bank for the Object Oriented Programming course, covering key concepts and principles of OOP and Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

Object Oriented Programming OOPs - CS3391 - Important Questions With Answer2 - Unit 1 - Introduction To OOP and Java

The document outlines the curriculum for a Bachelor of Engineering in Computer Science and Engineering at Anna University, including various subjects across eight semesters. It details core subjects such as Object Oriented Programming, Data Structures, and Artificial Intelligence, along with elective options. Additionally, it includes a question bank for the Object Oriented Programming course, covering key concepts and principles of OOP and Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Click on Subject/Paper under Semester to enter.

Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structure -
- CY3151 - PH3256 CS3301

Basic Electrical and


Algorithms - CS3401
Problem Solving and Electronics Engineering Object Oriented
Python Programming - - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks - Object Oriented


CS3591 Software Engineering
- CCS356
Compiler Design - Human Values and
5th Semester

CS3501 Embedded Systems Ethics - GE3791


7th Semester

8th Semester
6th Semester

and IoT - CS3691


Cryptography and Open Elective 2
Cyber Security - Open Elective-1 Project Work /
CB3491
Open Elective 3 Intership
Distributed Computing Elective-3
- CS3551 Open Elective 4
Elective-4
Elective 1
Management Elective
Elective-5
Elective 2
Elective-6
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to
enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
www.BrainKart.com

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BE- Computer Science and Engineering

Anna University Regulation: 2021

CS3391- Object Oriented Programming

II Year/III Semester

Question Bank

Unit-I Introduction to OOP and JAVA

Prepared By,

Mrs.J.Sweetline Arputham, AP/CSE

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 1 of 5
www.BrainKart.com
4931_GRACE College of Engineering,Thoothukudi

UNIT 1
INTRODUCTION TO OOP AND JAVA
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).

2.What are the four principles of OOP?


Abstraction, Encapsulation, Inheritance, Polymorphism

3. What are the features of Object Oriented Programming?


a. Emphasis is on data rather than procedure. Programs are divided into objects.
b. Functions that operate on the data of an object are tied together.
Objects may communicate with each other through functions. Follows bottom-upapproach.

4. What are the features of Java Language?


The features of Java Language are Simple, Object-Oriented, Portable, Platform
independent, Secured, Robust, Architecture neutral, Dynamic,
Interpreted, HighPerformance, Multithreaded and Distributed.

5. What are the operators supported in Java?


Operator in java is a symbol that is used to perform operations. For example: +, -, *, / etc.
There are many types of operators in java which are Unary Operator, Arithmetic Operator,
Shift Operator, Relational Operator, Bitwise Operator, Logical Operator, Ternary Operator
and, Assignment Operator.

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.

8. Define Objects and Classes in Java (Nov/Dec 2018)


A class can be defined as a template/blueprint that describes the behavior/state that the
object of its type support.ie. A class is a blueprint from which individual objects are created
An Object can be defined as an instance of a class. An object contains an address and takes
up some space in memory. Objects can communicate without knowing the details of each

CS3391_OOP_QB

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 2 of 5
www.BrainKart.com
4931_GRACE College of Engineering,Thoothukudi

other's data or code


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();

10. Define Encapsulation


The wrapping up of data and functions into a single unit is known as data encapsulation.
Here the data is not accessible to the outside the class. The data inside that class is
accessible by the function in the same class. It is normally not accessible from the outside of
the component.

11. What is Inheritance? What are its types?


Inheritance is a mechanism of reusing the properties and extending existing classes without
modifying them, thus producing hierarchical relationships between them.
Types: Single inheritance, Multi-level inheritance, Hierarchical inheritance, Hybrid
inheritance.

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

13. How will you declare a two dimensional array?


The two dimensional array can be declared and initialized as follows
Syntax: data_type array_name[][]=new data_type[size][size];For example: int a[][]=new
int[3][3];

14. Define access specifier/modifier? (Nov/Dec 2018) (Nov/Dec 2019)


Access specifiers/modifiers in Java helps to restrict the scope of a class,
constructor,variable, method or data member. There are four types of access modifiers
available injava:Default – No keyword required , Private , Protected and Public

15. What is the use of static keyword in Java?


The static keyword in Java is used for memory management mainly. We can apply java static
keyword with variables, methods, blocks and nested class. The static keyword belongs to the
class than an instance of the class

CS3391_OOP_QB

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 3 of 5
www.BrainKart.com
4931_GRACE College of Engineering,Thoothukudi

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.

17. What are the control flow statements in java?


if, if-else, nested-if , if-else-if,switch-case,jump – break, continue, return

18. What is JavaDoc?

Javadoc is a tool in Java programming that automatically generates documentation from


comments in the source code.
Javadoc comments are written using a specific syntax. They start with /** and end with */.

19. What do you mean by Dynamic Initialization?


Java is a flexible programming language which allows the dynamic initialization of variables. In
other words, at the time of declaration one can initialize the variables. In java we can declare the
variable at any place before it is used.Eg: int a=10; float d=2.34f;

20. List the programming Structures in JAVA.

Sequential Structure, Branching, Looping, Iterative Structure, Exception, methods and Functions

CS3391_OOP_QB

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 4 of 5
www.BrainKart.com
4931_GRACE College of Engineering,Thoothukudi

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

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes Page 5 of 5
Click on Subject/Paper under Semester to enter.
Professional English Discrete Mathematics Environmental Sciences
Professional English - - II - HS3252 - MA3354 and Sustainability -
I - HS3152 GE3451
Digital Principles and
Statistics and Probability and
Computer Organization
Matrices and Calculus Numerical Methods - Statistics - MA3391
- CS3351
- MA3151 MA3251
3rd Semester
1st Semester

4th Semester
2nd Semester

Database Design and Operating Systems -


Engineering Physics - Engineering Graphics
Management - AD3391 AL3452
PH3151 - GE3251

Physics for Design and Analysis of Machine Learning -


Engineering Chemistry Information Science Algorithms - AD3351 AL3451
- CY3151 - PH3256
Data Exploration and Fundamentals of Data
Basic Electrical and
Visualization - AD3301 Science and Analytics
Problem Solving and Electronics Engineering -
BE3251 - AD3491
Python Programming -
GE3151 Artificial Intelligence
Data Structures Computer Networks
- AL3391
Design - AD3251 - CS3591

Deep Learning -
AD3501

Embedded Systems
Data and Information Human Values and
and IoT - CS3691
5th Semester

Security - CW3551 Ethics - GE3791


6th Semester

7th Semester

8th Semester

Open Elective-1
Distributed Computing Open Elective 2
- CS3551 Project Work /
Elective-3
Open Elective 3 Intership
Big Data Analytics - Elective-4
CCS334 Open Elective 4
Elective-5
Elective 1 Management Elective
Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics GE3451
I - HS3152 - MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structure -
- CY3151 - PH3256 CS3301

Basic Electrical and


Algorithms - CS3401
Problem Solving and Electronics Engineering Object Oriented
Python Programming - - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks - Object Oriented


CS3591 Software Engineering
- CCS356
Compiler Design - Human Values and
5th Semester

CS3501 Embedded Systems Ethics - GE3791


7th Semester

8th Semester
6th Semester

and IoT - CS3691


Cryptography and Open Elective 2
Cyber Security - Open Elective-1 Project Work /
CB3491
Open Elective 3 Intership
Distributed Computing Elective-3
- CS3551 Open Elective 4
Elective-4
Elective 1
Management Elective
Elective-5
Elective 2
Elective-6
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to
enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering
Click on Subject/Paper under Semester to enter.
Environmental Sciences
Professional English and Sustainability -
Professional English - - II - HS3252 Discrete Mathematics - GE3451
I - HS3152 MA3354
Statistics and Theory of Computation
Matrices and Calculus Numerical Methods - Digital Principles and - CS3452
3rd Semester

4th Semester
- MA3151 MA3251 Computer Organization
1st Semester

2nd Semester

- CS3351 Artificial Intelligence


Engineering Graphics and Machine Learning
Engineering Physics - - CS3491
- GE3251 Foundation of Data
PH3151
Science - CS3352
Database Management
Physics for
Engineering Chemistry System - CS3492
Information Science Data Structures and
- CY3151 - PH3256 Algorithms - CD3291
Web Essentials -
Basic Electrical and IT3401
Problem Solving and Electronics Engineering - Object Oriented
Python Programming - BE3251 Programming - CS3391 Introduction to
GE3151 Operating Systems -
Programming in C -
CS3451
CS3251

Computer Networks -
CS3591
Object Oriented
Full Stack Web Software Engineering - Human Values and
5th Semester

Development - IT3501 CCS356 Ethics - GE3791


7th Semester

8th Semester
6th Semester

Distributed Computing Open Elective-1 Open Elective 2


- CS3551 Project Work /
Elective-3 Open Elective 3 Intership
Embedded Systems and
IoT - CS3691 Elective-4
Open Elective 4

Elective 1 Elective-5
Management Elective

Elective-6
Elective 2
All Computer Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Programming in C Computer Networks Operating Systems
Programming and Data Programming and Data Problem Solving and Python
Structures I Structure II Programming
Database Management Systems Computer Architecture Analog and Digital
Communication
Design and Analysis of Microprocessors and Object Oriented Analysis
Algorithms Microcontrollers and Design
Software Engineering Discrete Mathematics Internet Programming
Theory of Computation Computer Graphics Distributed Systems
Mobile Computing Compiler Design Digital Signal Processing
Artificial Intelligence Software Testing Grid and Cloud Computing
Data Ware Housing and Data Cryptography and Resource Management
Mining Network Security Techniques
Service Oriented Architecture Embedded and Real Time Multi - Core Architectures
Systems and Programming
Probability and Queueing Theory Physics for Information Transforms and Partial
Science Differential Equations
Technical English Engineering Physics Engineering Chemistry
Engineering Graphics Total Quality Professional Ethics in
Management Engineering
Basic Electrical and Electronics Problem Solving and Environmental Science and
and Measurement Engineering Python Programming Engineering

You might also like