Comprehensive Question Bank for Object Oriented Programming
Department of Information Technology
Question Bank (III Sem 2025-26)
Subject: Object Oriented Programming (3SN02)
Subject Faculty: Dr. P.P. Deshmukh
Unit I
Explain Object Oriented Programming principles with real-life examples.
Explain all primitive data types supported by the Java programming language with suitable examples.
Write ‘for’, ‘while’, and ‘do-while’ programs to compute 4 + 8 + 12 + 16 + … + 80.
What are the applications of Object Oriented Programming?
Explain the features of Java.
Redux State Management Examples and React Hooks Performance
Redux Task Store Implementation
1. Setup and Initial State
Import createStore from Redux. Note: In modern Redux Toolkit, this function is deprecated in favor of configureStore.
const { createStore } = require('redux'); // Or 'import { createStore } from 'redux';'
const initialState = { tasks: [] };
2. Action Types & Creators
Define actions for adding and removing tasks.
const ADD_TASK = 'ADD_TASK';
const REMOVE_TASK = 'REMOVE_TASK';
function addTask(task) { // task: { id, description }
return Understanding Relational Database Concepts and Operations
1. Relational Model Basics
Key Concepts:
- A relation is a set of tuples (no duplicates, no ordering).
- Each tuple conforms to the relation’s schema.
- Primary keys uniquely identify tuples.
- Foreign keys maintain referential integrity.
Practice Question: Consider a library database with Books(ISBN, title, author, year). Which statement is true?
- a) Two books can have the same ISBN if they’re different editions.
- b) The order of book records affects query results.
- c) Each book record must conform to the (ISBN, title,
Understanding Binary Search, Graphs, and Priority Queues
Q) How is binary search different from linear search?
| Linear Search | Binary Search |
|---|---|
| 1. Checks each element one by one from start to end. | 1. Repeatedly divides the sorted list into halves to find the element. |
| 2. Works on unsorted or sorted lists. | 2. Works only on sorted lists. |
| 3. Time complexity is O(n). | 3. Time complexity is O(log n) (much faster). |
| 4. Simple and easy to implement. | 4. Slightly more complex due to mid calculations. |
| 5. Inefficient for large datasets. | 5. Highly efficient for large datasets. |
| 6. No |
Fundamental Data Structures and Algorithms Concepts
A stack is a linear data structure that follows the Last In First Out (LIFO) principle. This means that the last element added to the stack is the first one to be removed. A stack can be visualized like a stack of plates; you can only add or remove the top plate.
Key operations of a stack include:
1. Push: Adding an element to the top of the stack.
2. Pop: Removing the element from the top of the stack.
3. Peek (or Top): Viewing the element at the top of the stack without removing it.
4. IsEmpty: Checking
Operating System Fundamentals and Linux Essentials
Operating System Concepts: Key Differences
This section outlines the differences between core operating system concepts:
- Preemptive and Non-Preemptive Scheduling
- Program and Process
- Hard Real-Time Systems and Soft Real-Time Systems
- Time Sharing and Multiprogramming
Preemptive vs. Non-Preemptive Scheduling
| Point | Preemptive Scheduling | Non-Preemptive Scheduling |
|---|---|---|
| 1 | CPU can be taken away from a running process before completion. | CPU cannot be taken away; the process runs until it finishes or waits. |
| 2 | Better response |
