ObjectOrientedProgramming 25ECSC204 Java 2025-26 Updated
ObjectOrientedProgramming 25ECSC204 Java 2025-26 Updated
FMTH0306/Rev.1.0
Course Plan
Semester: IV Year: 2025-26
Course Title: Object Oriented Programming Course Code:25ECSC204
Total Contact Hours: 50 Duration of ESA: 3 Hours
ISA Marks:50 ESA Marks:50
Lesson Plan Author: Mr. K.M.M. Rajashekharaiah, Dr. Date:
G.S Hanchinamani, Mr. Manjunath Gonal, Mrs.
Vijayalakshmi S, Mrs. Nirmal Patil
Checked By: Dr. Narayan D.G. Date:
Prerequisites: Knowledge of
i. C Programming
ii. Data Structures and Algorithms
Course Outcomes (COs):
At the end of the course the student should be able to:
Page 1 of 39.
Department Of Computer Science & Engineering
Page 2 of 39.
Department Of Computer Science & Engineering
2.1: Demonstrate an ability to 2.1.2: Identify critical [Link] Identify and Apply inheritance,
identify and define complex systems/sub systems, method overriding, dynamic method
engineering problems by variables, and constraints dispatch, abstract class, interfaces and
exception concept to implement the given
understanding real-world that characterize the
problem.
contexts and constraints. problem environment by [Link] Apply lambda expressions and/or
analyzing practical streams API to solve a problem.
contexts and real-world [Link] Apply spring boot/RESTful API to
limitations. build a solution for real world problems.
[Link] Apply appropriate collection
interfaces and classes (List, Set, Map, and
their implementations) to organize, store,
and manipulate data efficiently based on
problem requirements and usage
scenarios.
3.3: Demonstrate an ability to 3.2.2: Build [Link] Identify the relationship between
select an optimal design models/prototypes to the classes/objects to establish
solution considering cost- develop chosen design associations/aggregation/composition in
the design and interpret the design
effectiveness and solutions.
effectively
environmental impact.
[Link] Decompose complex problem
scenarios into well-defined classes and
subsystems by applying appropriate
design patterns (suitable structural and
behavioral design patterns) to manage
responsibilities and object creation.
Eg: 1.2.3: Represents Program Outcome ‘1’, Competency ‘2’ and Performance Indicators ‘3’.
Page 3 of 39.
Department Of Computer Science & Engineering
Course Content
Content Hrs
Unit – 1
Chapter No 1. Object Oriented Programming (OOP) Concepts and JAVA 06 hrs
Language Fundamentals: Introduction to OOP, Object Oriented Paradigm, Applications
of OOP. Features of JAVA, JVM, JDK, Source File Structure. Programming constructs
and String Handling. Class Diagrams-UML notations. Types of relations between
classes.
Chapter No 2. Classes and Objects 08 hrs.
Class Fundamentals, Declaring objects, Assigning object reference variables, Introducing
methods, Constructors, this key word, Garbage collection: The finalize method. A closer
Look at Methods and Classes: Overloading: Methods, Constructors. Using objects as
Parameters, Returning objects, Access control. Understanding static and final keywords.
Introducing nested and inner classes.
Chapter No. 3 Inheritance and Polymorphism 06 hrs.
Inheritance: Basics, Usage of super key word, Method overriding, Dynamic method
dispatch, Abstract classes, Object class.
Unit – 2
Chapter No. 4 Packages, Interfaces &Exception handling 10 hrs.
Packages and Interfaces: Packages, Access protection, Importing packages. Interfaces.
Exception Handling: Fundamentals, Exception Types, Using try, catch, throw, throws
and finally, Multiple catch, Nested try statements, and user defined exceptions.
Chapter No. 5: Collections Framework: Introduction, List Interface, List 04 hrs.
Implementation Classes, Set Interface, Set Implementation Classes, The Map Interface,
Map Implementation Classes.
Chapter No. 6: Lambda Expressions & Streams API: Functional programming, 06 hrs.
Functional interface, Bulk operations on collections, Basics of Streams, Reduction
operations, Iterators and Streams
Unit – 3
Chapter No. 7 Design Patterns: Creational, Structural and Behavioral design patterns. 5 hrs.
Chapter No. 8: Spring Boot: Overview, key features, architecture, setting-up a Spring 5 hrs.
Boot, RESTful API, spring data JPA, CRUD Operations.
Page 4 of 39.
Department Of Computer Science & Engineering
Textbooks
1. Herbert Schildt, “The Complete Reference”, 9th Edition, McGraw-Hill.
Reference Books
1. Kathy Sierra and Bert Bates, Head First JAVA, 2, O'Reilly Media.
2. Introduction to Java Programming, Liang Y D, Pearson, 7th Edition.
Evaluation Scheme
ISA Scheme
Assessment Weightage in Marks
ISA-1 20
ISA-2 20
Activity (UML 10
Design)
Total 50
Page 5 of 39.
Department Of Computer Science & Engineering
Note
1. Each Question carries 20 marks and may consists of sub-questions.
2. Mixing of sub-questions from different chapters within a unit (only for Unit I and Unit II)
is allowed in ISA I, II and ESA
3. Answer 5 full questions of 20 marks each (two full questions from Unit I, II and one full
questions from Unit III) out of 8 questions in ESA.
Page 6 of 39.
Department Of Computer Science & Engineering
Parameter Marks PI CO BL
Design- Draw 5 The student is able to The student is able The student is unable to
detailed Class draw the complete to draw the partial draw the class diagram.
diagrams class diagram using class diagram using
PI: 3.2.2 UML notations and UML notations and
CO: 5 design patterns. partial design
BL: L4 pattern.
Page 7 of 39.
Department Of Computer Science & Engineering
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
1. Differentiate between structured and object Oriented 1 L3 1.3.3
Programming.
2. Explain the principles of Object Oriented Programming (OOP). 1 L2 1.3.3
3. Explain java platform features. 1 L2 1.3.3
4. Write java programs using arrays, strings and basic types. 1 L3 1.3.3
5. Draw the class diagram using proper UML notations 5 L3 3.3.2
Lesson Schedule
Class No. - Portion covered per hour
1. Introduction to OOP, Object Oriented Paradigm, Applications of OOP.
2. Features of JAVA, JVM, JDK, Source File Structure.
3. Programming constructs, arrays.
4. String Handling
5. Class Diagrams-UML notations.
6. Types of relations between classes.
Review Questions
[Link]. - Questions TLOs BL PI Code
1. Compare and contrast structured and object oriented 1 L2 1.3.3
programming paradigms.
2. List and explain OOP features. 1 L2 1.3.3
3. Explain java features. 1 L2 1.3.3
4. Explain the structure of java programs with an example. 1 L2 1.3.3
5. Explain arrays? Write a sample code to demonstrate array of 3 L3 1.3.3
basic type and its usage.
6. How many objects will be created in the following code? 3 L2 1.3.3
String s1=”kletech”;
String s2=”kletech”;
7. Explain that the java is platform independent programming 2 L2 1.3.3
Page 8 of 39.
Department Of Computer Science & Engineering
language.
8. Demonstrate the strings are immutable in java. 3 L3 1.3.3
9. Differentiate string and StringBuffer classes with example. 3 L3 1.3.3
10. Write the output of the following code snippet. 3 L3 1.3.3
class StringComparisonUsingEqualsMethod{
public static void main(String args[]){
String s1="Sachin";
String s2="Sachin";
String s3=new String("Sachin");
String s4="Saurav";
[Link]([Link](s2));//true
[Link]([Link](s3));//true
[Link]([Link](s4));//false
}
}
11. Explain the Object-Oriented Paradigm and discuss how it 1 L2 1.3.3
supports real-world modelling with suitable examples.
12. Describe the roles of JVM, JRE, and JDK in the Java execution 2 L3 1.3.3
environment. How do they interact during program execution?
13. Write a Java program to perform basic string operations such 3 L3 1.3.3
as length calculation, concatenation, and character extraction.
Page 9 of 39.
Department Of Computer Science & Engineering
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
[Link] classes and objects. 2 L2 1.3.3
[Link] constructor and overloading of method to solve a given 2 L2 1.3.3
problem.
[Link] static members concept to solve a given problem. 2 L3 1.3.3
[Link] methods with objects as parameter and return value. 2 L2 1.3.3
[Link] nested and inner classes concepts to solve a given 2 L3 1.3.3
problem.
[Link] class diagrams using UML notations for a given scenario. 2 L3 3.2.2
Lesson Schedule
Class No. - Portion covered per hour
1. Class Fundamentals, Declaring objects, Assigning object reference variables.
2. Introducing methods, Constructors, this key word, Garbage collection: The finalize
method.
3. A closer Look at Methods and Classes.
4. Overloading: Methods, Constructors.
5. Overloading: Methods, Constructors.
6. Using objects as Parameters, Returning objects.
7. Access control. Understanding static and final keyword.
8. Nested and inner classes.
Review Questions
[Link]. - Questions TLOs BL PI Code
1. What is class and object? Write a program demonstrating access 1 L3 1.3.3
of same object with more than one reference?
2. Discuss i) Default constructor ii) Parameterized constructor iii) 1 L2 1.3.3
Copy constructor with examples.
3. Demonstrate passing array of objects to a function with sample 1 L3 1.3.3
code.
4. Create a class Point with members intx,y. Create two Point 2 L3 1.3.3
objects and initialize them different values for x and y. Then
swap the member values of the objects with each other.
5. Create a class Line with members p1 and p2 which are objects 2 L3 1.3.3
Page 10 of 39.
Department Of Computer Science & Engineering
Page 11 of 39.
Department Of Computer Science & Engineering
11. Explain the significance of the this keyword with an example. 1 L2 1.3.3
13. Write a Java program using static data members and static 3 L3 1.3.3
methods.
14. Differentiate static nested classes and inner classes with 5 L3 1.3.3
examples.
15. Identify classes, relationships, and draw a UML class diagram 6 L3 3.2.2
for a Company–Employee system.
Page 12 of 39.
Department Of Computer Science & Engineering
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
[Link] inheritance and polymorphism. 2 L2 2.1.2
5. Draw the class diagram for the given class hierarchy. 2 L3 3.2.2
Lesson Schedule
Class No. - Portion covered per hour
1. Inheritance: Basics, types, application of inheritance and UML
2. Usage of super key word
3. Method overriding
4. Dynamic method dispatch
5. Abstract classes
6. Object class
Review Questions
[Link]. - Questions TLOs BL PI Code
1. Define inheritance. Explain different types of inheritance 1 L2 2.1.2
supported by java.
2. How constructors of parent class are invoked? Illustrate with a 1 L3 2.1.2
program?
3. Explain order of creation of a derived class object in a 3 L2 2.1.2
hierarchy of inherited classes.
4. Consider a class hierarchy Employee(empId, name, salary, 3 L3 2.1.2
bonus) Manager(numberOfShares) and
Salesman(numberOfSales). Assume initial bonus amount is
zero for all employees. Define a method to pay bonus and
consider type of employee while paying bonus. Write a java
program to create a structure of all the classes.
Page 13 of 39.
Department Of Computer Science & Engineering
Page 14 of 39.
Department Of Computer Science & Engineering
Page 15 of 39.
Department Of Computer Science & Engineering
UNIT II
Course Titleand Code: Object Oriented Programming(25ECSC204)
Chapter Number and Title: 4: Packages , Interfaces & Exception Planned Hours:10 hrs
handling
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
1. Explain packages, Interfaces and Exception handling mechanism 3 L2 2.1.2
of java.
2. Write java program to create code library using packages. 3 L2 2.1.2
3. Write a java program to manage run time errors using java 3 L3 2.1.2
exception handling mechanism.
4. Write a java program to implement interfaces for a given 3 L3 2.1.2
problem specification.
5. Draw the class diagram using appropriate UML notations for the 3 L3 3.2.2
given scenario.
Lesson Schedule
Class No. - Portion covered per hour
1. Packages: Define, create, access protection and importing packages.
2. Interfaces: Define, create interface and implement.
3. Implementing polymorphism using interfaces.
4. Differences between interfaces and abstract classes.
5. Multiple inheritance and Run time polymorphism using interfaces.
6. Exceptions: Define, Exception handling fundamentals
7. Classification: Exception Types
8. Examples. Using try, catch keywords of exception handling, multiple catch blocks.
9. Using throw, throws, finally keywords to manage exceptions
10. User defined exceptions.
Review Questions
[Link]. - Questions TLOs BL PI Code
1. Explain why packages in java? 1 L2 2.1.2
2. Explain access protection supported by packages. 1 L2 2.1.2
Page 16 of 39.
Department Of Computer Science & Engineering
// Type declarations:
interface I1 {}
interface I2 {}
class C1 implements I1 {}
class C2 implements I2 {}
class C3 extends C1 implements I2 {}
Page 17 of 39.
Department Of Computer Science & Engineering
// Reference declarations:
C1 obj1;
C2 obj2;
C3 obj3=null;
Select the one correct answer.
(a) obj2 = obj1;
(b) obj3 = obj1;
(c) obj3 = obj2;
(d) I1 a = obj2;
(e) I1 b = obj3;
(f) I2 c = obj1;
12. Explain how Java packages help in avoiding name conflicts 1 L2 2.1.2
and improving code reusability. Illustrate with an example
involving two packages containing classes with the same
name.
14. Explain the exception handling flow in Java when multiple 3 L2 2.1.2
catch blocks and a finally block are used. Support your answer
with a suitable code snippet.
15. Design and implement a Java program that uses the throw 3 L3 2.1.2
and throws keywords to handle invalid input conditions in a
typical banking application.
16. For a Payment System scenario supporting Cash, Card, and 5 L3 3.2.2
UPI payments, identify suitable interfaces and classes, explain
how runtime polymorphism is achieved, and draw the
corresponding UML class diagram.
Page 18 of 39.
Department Of Computer Science & Engineering
Lesson Schedule
Class No. - Portion covered per hour
1. Introduction to Collection Framework, Interfaces and classes
2. Exploring List Interface
3. Exploring List, set and Queue interface implementation classes
4. Exploring Map Interface and its implementation class
Review Questions
[Link]. - Questions TLOs BL PI Code
1. Outline the key advantages of collection framework. 2 L2 2.1.2
2. Explain the List and Set interfaces by highlighting 1 L2 2.1.2
important methods.
3. Explain the following methods of Queue interface 1 L2 2.1.2
i) Element ii) Offer(E obj) iii) peek()
iv) poll() v) remove()
4. Suppose setA is a set that contains the strings "CPU", 4 L3 2.1.2
"RAM", and "SSD", and setB is another set that contains
the strings "RAM", "GPU", and "HDD". Answer the
following questions assuming all the statements are
executed sequentially.
a) What are the contents of setA and setB after executing
[Link](setB)?
b) What are the contents of setA and setB after executing
[Link](setB)?
c) What are the contents of setA and setB after executing
[Link](setB)?
d) What is the content of setA after executing
[Link]()?
Page 19 of 39.
Department Of Computer Science & Engineering
Page 20 of 39.
Department Of Computer Science & Engineering
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
1. Explain functional interface. 4 L2 2.1.2
2. Explain Lambda expressions and stream interface. 4 L2 2.1.2
3. Identify the need of lambda expression/streams API to solve the 4 L3 2.1.2
given problem and implement using lambda expressions/streams
API.
4. Implement the generic functional interface for the given 4 L3 2.1.2
scenario.
5. Explain the reduction operations and give example. 4 L3 2.1.2
Lesson Schedule
Class No. - Portion covered per hour
1. Functional programming
2. Functional interface and Lambda expressions
3. Bulk operations on collections
4. Basics of Stream and stream operations
5. Reduction operations
6. Iterators and Streams
Review Questions
Sl. No. – Questions TLOs BL PI Code
1. Define lambda expression and streams API. Give one example 1 L2 2.1.2
for each.
2. 3 L3 2.1.2
// A sample functional interface
// (An interface with a single abstract method (SAM)
interface FunctionalInterface {
// An abstract function
void abstractFunction(int x);
}
Write two different lambda implementation for the given
Page 21 of 39.
Department Of Computer Science & Engineering
functional interface
Page 22 of 39.
Department Of Computer Science & Engineering
Optional<Integer>someVal=
[Link](Integer::compare);
if ([Link]())
[Link]("value: " + [Link]());
Page 23 of 39.
Department Of Computer Science & Engineering
UNIT III
Course Titleand Code: Object Oriented Programming(25ECSC204)
Chapter Number and Title: 7: Design Patterns Planned Hours:5hrs
Learning Outcomes:-
At the end of the topic the student should be able to:
Topic Learning Outcomes COs BL CA Code
1. Explain Design patterns and its types. 5 L2 3.2.2
2. Apply a suitable design pattern to solve a given problem. 5 L3 3.2.2
3. Analyze and compare creational, structural, and behavioral 5 L3 3.2.2
design patterns to justify their selection for a given software design
scenario.
Lesson Schedule
Class No. - Portion covered per hour
1. Creational design patterns
2. Creational design patterns
3. Structural design patterns.
4. Structural design patterns.
5. Behavioural design patterns.
Review Questions
TLO
Sl. No. – Questions BL PI Code
s
Page 24 of 39.
Department Of Computer Science & Engineering
L3 3.2.2
7. Design a notification system where users receive updates via SMS, Email, or App
2 L3 3.2.2 2
notification. Apply an appropriate design pattern and implement it.
Lesson Schedule
Class No. - Portion covered per hour
1. Overview, key features, architecture, setting-up a Spring Boot
2. RESTful API
3. Spring data JPA
4. CRUD Operations.
5. Integration of RESTful APIs with Spring Data JPA and CRUD operations (case
study / hands-on example)
Review Questions
Page 25 of 39.
Department Of Computer Science & Engineering
Page 26 of 39.
Department Of Computer Science & Engineering
Page 27 of 39.
Department Of Computer Science & Engineering
Page 28 of 39.
Department Of Computer Science & Engineering
Page 29 of 39.
Department Of Computer Science & Engineering
channelList[ ], balance.
• Create class NetworkProvider with
members BroadBandbbArray[ ], DTH
dArray[ ], bbCount, dthCount. Include
methods like
registerNewConnection(BroadBand b),
registerNewConnection( DTH d),
displayConnetions(inttypeOfConnections)
Page 30 of 39.
Department Of Computer Science & Engineering
1.b Write the output of the following code snippet and 06 3 L3 14 2.1.2
comment on the output.
interface Movable {
void move();
}
interface Stoppable {
void stop();
}
class Robot implements Movable, Stoppable {
public void move() {
[Link]("Robot is moving");
}
Page 31 of 39.
Department Of Computer Science & Engineering
2.a Write the output of the following code snippet and 04 3 L3 14 2.1.2
comment on your output.
3.b Write the output of the following code snippet and 06 3 L3 14 2.1.2
write your comment on the output.
class StreamDemo2 {
public static void main(String[] args) {
// Create a list of Integer values.
ArrayList<Integer>myList = new ArrayList<>( );
[Link](7);
[Link](18);
Page 32 of 39.
Department Of Computer Science & Engineering
[Link](10);
[Link](24);
[Link](17);
[Link](5);
// Two ways to obtain the integer product of the
elements
// in myList by use of reduce().
Optional<Integer>productObj =
[Link]().reduce((a,b) -> a*b);
if([Link]())
[Link]("Product as Optional: " +
[Link]());
int product = [Link]().reduce(1, (a,b) -> a*b);
[Link]("Product as int: " + product);
}
}
Page 33 of 39.
Department Of Computer Science & Engineering
Page 34 of 39.
Department Of Computer Science & Engineering
Page 35 of 39.
Department Of Computer Science & Engineering
UNIT II
[Link] Questions Marks CO BL PO PI
Code
4.a Explain the class hierarchy of exception 04 3 L2 14 14.1.1
handling in java.
4.b Write the output of the following code snippet 06 3 L3 14 14.1.1
and comment on the output.
interface Movable {
void move();
}
interface Stoppable {
void stop();
}
class Robot implements Movable, Stoppable {
public void move() {
[Link]("Robot is moving");
}
Page 36 of 39.
Department Of Computer Science & Engineering
import [Link];
import [Link];
class Test {
public static void main(String[] args)
{
try
{
[Link]("1");
int value = 10 / 0;
throw new IOException();
}
catch(EOFException e)
{
[Link]("2");
}
catch(ArithmeticException e)
{
[Link]("3");
}
catch(NullPointerException e)
{
[Link]("4");
}
catch(IOException e)
{
[Link]("5");
}
catch(Exception e)
{
[Link]("6");
}
}
}
5.b What is lambda expression and provide syntax 06 4 L2 1 1.3.1
of lambda expression with examples.
5.c Consider a class hierarchy Employee(empId, 10 3 L3 14 14.1.1
name, salary, bonus)
Manager(numberOfShares) and
Salesman(numberOfSales). Assume initial
Page 37 of 39.
Department Of Computer Science & Engineering
Page 38 of 39.
Department Of Computer Science & Engineering
UNIT - III
[Link]. Questions Marks CO BL PO PI
Code
Page 39 of 39.