Combined 2 Bank (Sonali & Janata) Officer IT: Exam: 04.10.2024 (BIBM)প্রশ্ন ও সমাধান
- Set by
- Combined Bank
- Post
- Officer
- Exam date
- 4 Oct 2024
- Conducted by
- BIBM
- Questions
- 5 (0 MCQ, 5 written)
- Exam guide
- Bank IT jobs · ব্যাংকের আইটি চাকরি
- Mathematics · গণিত 2
- Computer Architecture · কম্পিউটার আর্কিটেকচার 1
- Operating Systems · অপারেটিং সিস্টেম 1
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 1
Find the sets X and Y if X∪Y= {1, 2, 3, 5, 6, 8, 9, 10}, X∩Y= {1, 5} and Y-X= {2, 6, 9, 10}.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explain how encapsulation and inheritance are advantageous in object oriented programming.
Model answer
Encapsulation bundles an object's data and the methods that operate on it into one unit, exposing only a controlled public interface and hiding internal representation.
Advantages:
- Data hiding/security - internal state cannot be corrupted by uncontrolled external access; only validated methods (getters/setters) can change it.
- Easier maintenance - the internal implementation (data storage, algorithm) can be changed freely as long as the public interface stays the same, without breaking other code.
- Reduced complexity for users - callers only need to know the public methods, not internal details, lowering cognitive load.
- Easier debugging/testing - because access is funneled through a small set of methods, it is easy to trace which method mutated a value.
Inheritance lets a new (derived/child) class acquire the attributes and behaviors of an existing (base/parent) class.
Advantages:
- Code reuse - common fields/methods are written once in the base class and reused by every subclass, reducing duplication and development time.
- Hierarchical modeling - naturally represents "is-a" relationships (e.g.
Manager is-a Employee), mirroring real-world taxonomies. - Extensibility/polymorphism - subclasses can override or extend base behavior, enabling polymorphic code that works uniformly across a family of related types.
- Easier maintenance - a fix or improvement in the base class automatically propagates to all subclasses.
classDiagram
class Employee {
-string name
-double salary
+getSalary() double
}
class Manager {
-List~Employee~ team
+getSalary() double
}
Employee <|-- Manager
Exam takeaway: encapsulation protects and simplifies how data is used; inheritance promotes reuse and hierarchical extensibility - together they are the pillars that let OOP systems scale and stay maintainable as they grow.
If you throw two unbiased dice (each with six sides) together, what is the probability that the sum of two upward faces will be 7? Explain your answer.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
How many total bits are required for a direct mapped cache with 16KB of data and 4-word blocks? Assuming a 32 bit address?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Give the necessary conditions for deadlock to occur. Is it possible to have deadlock involving only a single process? Explain your answer.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers · Bank IT jobs guide