solution - STET Computer Science : Asked Question-2023 (part-1)

Question : What is the main purpose of inheritance in OOP?

Solution : To establish a parent-child relationship between classes

Description -

The main purpose of inheritance in Object-Oriented Programming (OOP) is to promote code reusability and hierarchical relationships between classes.

Key Goals of Inheritance:

  1. Code Reuse: Allows a new class (child or subclass) to inherit attributes and methods from an existing class (parent or superclass), reducing code duplication.

  2. Extensibility: Enables developers to extend or modify existing behavior without changing the original code.

  3. Polymorphism: Supports dynamic method overriding, allowing subclasses to provide specific implementations of methods defined in the parent class.

  4. Hierarchy Representation: Models real-world relationships (e.g., a Dog is a type of Animal).

  5. Maintainability: Centralizes common logic in base classes, making systems easier to maintain and update.

STET Computer Science : Asked Question-2023 (part-1)

Question : Which principle ensures that only essential information is visible to the outside world?

Solution : Abstraction

Description -

Abstraction in Object-Oriented Programming (OOP) is one of the fundamental principles, along with encapsulation, inheritance, and polymorphism. It refers to the concept of hiding the complex implementation details and showing only the essential features of an object.

Real-life Example:

Think of a car:

  • What you interact with: Steering wheel, accelerator, brake (this is the abstract interface).

  • What you don’t see: The engine, the fuel combustion system, brake hydraulics (this is the internal complexity).

abstract class Animal {
abstract void makeSound(); // Abstract method
}

class Dog extends Animal {
void makeSound() {
System.out.println("Bark");
}
}

Benefits of Abstraction:

  • Reduces complexity

  • Increases code reusability

  • Improves security by hiding implementation details

  • Makes maintenance easier

 

STET Computer Science : Asked Question-2023 (part-1)

Question : Which of the following best defines a class?

Solution : A blueprint for creating objects

Description -

A class defines the structure and behavior (data and functions) that the objects created from the class will have. You can think of it like an architectural blueprint for a house — it outlines what the house should include, but it's not the house itself.

An object is an instance of a class — a concrete implementation created based on the blueprint.


 Class vs Object (Quick Table)

Term Description Example
Class The blueprint or template Car class
Object The actual thing created from the class myCar = Car()

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the purpose of the "super" keyword in Java and other similar languages?

Solution : It refers to the superclass in inheritance

Description - The super keyword exists in several object-oriented programming languages, not just Java. Its purpose is generally the same: to access methods or constructors from a superclass (parent class).

STET Computer Science : Asked Question-2023 (part-1)

Question : What is an abstract class in OOP?

Solution : A class that cannot be instantiated

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which keyword is used to create an instance of a class in most programming languages?

Solution : new

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the purpose of staffing level estimation in software project management?

Solution : To identify potential risks in the project

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which metric is used for estimating the size of a software project?

Solution : Function Points (FP)

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the main goal of System Testing?

Solution : Testing software functionality from the user's perspective

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which testing approach involves testing individual components or units of code?

Solution : Unit Testing

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Reverse engineering is primarily used for:

Solution : Understanding and documenting existing software

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the main goal of software quality assurance?

Solution : To establish and enforce standards and processes to improve software quality

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which software life cycle model allows for iterative development and incorporates risk analysis?

Solution : Spiral model

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the purpose of ARP (Address Resolution Protocol)?

Solution : To map MAC addresses to IP addresses

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Routing involves:

Solution : Determining the best path for data packets

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Contention-based MAC protocols are commonly used in:

Solution : Ethernet networks

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which of the following is NOT a network topology?

Solution : Disk

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Data transmission using multiple pathways simultaneously is known as:

Solution : Parallel Transmission

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is a socket in the context of process-to-process communication?

Solution : A software interface for network communication

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the primary function of routing in the network layer?

Solution : Finding the best path for data

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The term "Data" refers to:

Solution : Row Facts and figures

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The term "FAT" is stands for_____

Solution : File Allocation Table

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The term "DFD" stands for?

Solution : Data flow diagram

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which of the following is a top-down approach in which the entity's higher level can be divided into two lower sub-entities?

Solution : Specialization

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The term "NTFS" refers to which one of the following?

Solution : New Technology File System

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which of the following is correct according to the technology deployed by DBMS?

Solution : Locks are used to maintain transactional integrity and consistency

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is DBMS?

Solution : DBMS stores, modifies and retrieves data

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In multiprogramming with fixed partitions, if a process requires more memory than is available in a partition, it may lead to:

Solution : Fragmentation

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The purpose of a page table in a paging system is to:

Solution : Translate virtual addresses to physical addresses

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The primary goal of load control is to:

Solution : Ensure that CPU time is evenly distributed among processes

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The I/O subsystem in an operating system is responsible for:

Solution : Managing input/output operations between processes and input/output devices

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : File manipulation operations in an operating system include:

Solution : Reading, writing, and modifying file content

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In an operating system, a "buffer cache" is used to:

Solution : Store copies of frequently used files in memory

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : A formal model of protection in an operating system provides:

Solution : A mathematical framework for analyzing resource allocation

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The process of removing recursion involves replacing recursive function calls with:

Solution : Loops

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In the Tower of Hanoi problem with "n" disks, how many moves are required to solve the problem?

Solution : 2^n - 1

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which collision resolution technique involves placing collided elements in the next available empty slot in the hash table?

Solution : Linear probing

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Separate chaining involves storing collided elements in separate data structures, typically in:

Solution : Linked lists

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In a directed graph, an edge that points from vertex A to vertex B is denoted as:

Solution : (A, B)

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which traversal algorithm is typically implemented using a stack data structure?

Solution : DFS

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : A threaded binary tree is a binary tree in which:

Solution : Each node has a thread connecting it to its predecessor or successor

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Divide and Conquer is an algorithmic paradigm that solves problems by:

Solution : Recursively solving subproblems

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : The recurrence equation T(n) = T(n/2) + 1 represents the time complexity of which algorithmic paradigm?

Solution : Divide and Conquer

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : If an algorithm's behavior is bounded by "o(f(n)) if g(n)", what notation does it become when the condition is removed?

Solution : o(f(n))

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Conditional asymptotic notation allows for a more nuanced analysis of algorithm behavior under specific conditions. This is particularly useful when:

Solution : Algorithm behavior varies based on certain input characteristics

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which term refers to the strategy of optimizing an algorithm's use of resources, often by making sacrifices in one aspect for improvements in another?

Solution : Tradeoff

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which data structure often results in a time-space tradeoff by using extra memory to speed up operations?

Solution : Hash tables

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Microcontrollers find application in various fields. What is a typical application of microcontrollers in the automotive industry?

Solution : Engine control in cars

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : How is the width of the data bus typically measured in a microcomputer system?

Solution : In bits

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which component of an ideal microcomputer is responsible for temporarily holding data and instructions during processing?

Solution : Memory

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : To convert a Gray Code to its binary equivalent, which technique is commonly used?

Solution : Exclusive OR (XOR) operation

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the relationship between the distance between parity bits and their error detection and correction capability in Hamming Code?

Solution : Closer parity bits provide lower error correction capability

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In binary multiplication using the simple method, what is the first step after aligning the digits and preparing for multiplication?

Solution : Multiply the least significant bit (LSB) by the multiplier

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : If the sum of two positive binary numbers is 11010 and there is a carry-out from the MSB, what should be done to obtain the correct result?

Solution : Add the carry to the least significant bit (LSB)

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Given a Boolean function F(A, B, C) = Σ(0, 1, 2, 3, 5), what is the expression in SOP form?

Solution : A'B' + AB' + AB + AC

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the primary difference between ROM and RAM?

Solution : ROM stores permanent data that cannot be changed, while RAM stores temporary data that can be read and written

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which logic family uses both depletion and enhancement mode MOSFETs for its operation?

Solution : CMOS

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : Which type of register is primarily used to temporarily hold data during arithmetic and logical operations in a microprocessor?

Solution : Accumulator register

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : In a PLA, what components are used to implement the combinational logic functions?

Solution : AND gates and OR gates

Description -

STET Computer Science : Asked Question-2023 (part-1)

Question : What is the simplified expression for the Boolean function F(A, B, C, D) = Σ(0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14) using the K-map method?

Solution : A'B'C'D' + A'B'C'D + A'BC'D + AB'C'D + ABCD

Description -

STET Computer Science : Asked Question-2023 (part-1)