0% found this document useful (0 votes)
47 views

BCS 403 - Object Oriented With JAVA - CS

java paper bcs 403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

BCS 403 - Object Oriented With JAVA - CS

java paper bcs 403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

KIET Group of Institutions Roll No.

PUE Examination (2023-2024) EVEN Semester

Department: CS/CSE/CSIT/CSE (AIML)/IT Course: B.Tech


Year: II Semester: IV
Subject Name: Object Oriented Programming with Java Subject Code: BCS 403
Duration: 3Hrs Max. Marks: 70
Note: Attempt all the questions of each section.

Attempt all questions. (10*2=20)


Competiti C
Question BL/KC*
ve Exam O
Construct a student class which has the following variable name, rollno, and 1 3C
a.
emailid. Implement the parameterized constructor for the same class.
b. Distinguish the keywords final and finally. 1 2C
c. Describe the Exception handling. 2 2C
d. How do we apply Thread Synchronization? 2 2C
e. Distinguish between interface and functional interface. 3 2C
1 If a developer does not want to allow extending a class to others class except 3 3P
f.
A, B classes. How he will apply this constraint in java.
g. Draw the collection hierarchy. 4 2C
h. Distinguish between Set and Map interface. 4 2C
Define POJO class and explain the dependency injection with the help of an 5 2C
i.
example.
j. Outline the different scope of beans.. 5 1F
Section-B 5X4=20
Competi
BL/
Q. No. Question tive CO
KC*
Exam
Illustrate interface and customize an interface Flyable with a method called
fly_obj(). Create three classes Spacecraft, Airplane, and Helicopter that
a. implement the Flyable interface. Implement the fly_obj() method for each of the
three classes.
2 OR 1 3P
Illustrate abstract class and customize an abstract class 'Bank' with an abstract
method 'getBalance'. $100, $150 and $200 are deposited in banks A, B and C
b. respectively. 'BankA', 'BankB' and 'BankC' are subclasses of class 'Bank', each
having a method named 'getBalance'. Call this method by creating an object of
each of the three classes.
Compare checked and Unchecked exception. Assign the role of try, catch and
a. finally in exception handling. Illustrate with help of an example.
3 OR 2 3P
Demonstrate the life cycle of thread with the help of printing the table of 2, 3,
b and 5 by using thread.
4 a. Construct a java program to find odd no of elements from an ArrayList using 3 3P
Stream API.
OR
b Implement a Java program that starts with a list li containing integers [10, 11, 30,
● CO-Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
● Bloom’s Level (BL)-Bloom’s taxonomy frame work is planning and designing of assessment of student’s learning.
● *KnowledgeCategories(KCs):F-Factual,C-Conceptual,P-Procedural,M-Metacognitive
● #Reference to Competitive Exams (GATE, GPAT, CAT, GRE, TOFEL, NET, etc.)
15]. It uses Java streams to perform two main operations: first, the filter()
operation selects only the even numbers from the list, and then the map()
operation computes the square of each even number.
Construct a Java program to manage a simple contact list using a HashMap. The
a. contact list should allow adding, removing, and searching for contacts. Each
contact should have a name (key) and a phone number (value).
5 OR 4 3P
b. Implement a Java program to insert the specific element at the end of a linked
list.
Explain the different types of Dependency Injection (DI) supported by the Spring
a Framework. Provide examples of each type and discuss their advantages and
disadvantages.
6 5 3P
OR
Explain the structure of a Spring Boot project. How does it differ from a traditional
b Spring project? Illustrate with an example?
Section-C 5X6= 30
Question Competi
BL/
Q. No. tive CO
KC*
Exam
Classify the inheritance in java and implement a Java program to operate a class
known as “BankAccount” with methods called deposit() and withdraw(). Create
a.
a subclass called SavingsAccount that overrides the withdraw() method to
withdrawals if the account balance falls below one hundred.
7
OR
1 3P
Demonstrate how encapsulation is implemented in Java with its benefits.
b. Illustrate the difference between private, protected, default, and public access
modifiers.
Explain the difference between FileReader and BufferedReader. Why would you
a. use a BufferedReader instead of a FileReader? Construct a Java program to read
data from “input.txt” file line by line by using BufferedReader class.
8
OR
Explain thread synchronization? Implement the thread synchronization with the 2 3P
b.
help of a suitable example.
Distinguish between interface (Java 8) and functional interface. Construct a Java
a. program to implement a lambda expression to convert a list of strings to
uppercase and lowercase.
9 OR
3 3P
Explain how to define a sealed class in Java with keywords and syntax involved.
b. Provide its advantages and example of scenarios where sealed classes can be
particularly beneficial with implementation.
List out the differences between the given below
(a) ArrayList Vs Vector
a. (b) HashSet and HashMap
(c) Comparable and Comparator
10 (d) HashTable and HashMap
OR 4 3P
Construct a Java program to add all the elements of a specified Tree set to
b.
another Tree set.
11 a. Explain the dependency injection using autowiring supported by the Spring
Framework. Provide implementation of byName and Constructor autowiring 5 3P
with the help of an example.

● CO-Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
● Bloom’s Level (BL)-Bloom’s taxonomy frame work is planning and designing of assessment of student’s learning.
● *KnowledgeCategories(KCs):F-Factual,C-Conceptual,P-Procedural,M-Metacognitive
● #Reference to Competitive Exams (GATE, GPAT, CAT, GRE, TOFEL, NET, etc.)
OR
b. Explain how you can use Spring Boot to create a simple RESTful microservice.

● CO-Course Outcome generally refer to traits, knowledge, skill set that a student attains after completing the course successfully.
● Bloom’s Level (BL)-Bloom’s taxonomy frame work is planning and designing of assessment of student’s learning.
● *KnowledgeCategories(KCs):F-Factual,C-Conceptual,P-Procedural,M-Metacognitive
● #Reference to Competitive Exams (GATE, GPAT, CAT, GRE, TOFEL, NET, etc.)

You might also like