Milk Vita Assistant Manager (CSE/MIS) Exam: 2023প্রশ্ন ও সমাধান
- Set by
- Milk Vita
- Post
- Assistant Manager (CSE/MIS)
- Exam date
- 2023
- Questions
- 7 (0 MCQ, 7 written)
- Exam guide
- Government IT officer posts · সরকারি প্রতিষ্ঠানের আইটি পদ
- Database · ডেটাবেজ 2
- Operating Systems · অপারেটিং সিস্টেম 2
- Algorithms · অ্যালগরিদম 1
- Programming · প্রোগ্রামিং 1
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 1
What is software design pattern? What are the advantages?
Model answer
Direct answer: a software design pattern is a general, proven, reusable solution template to a commonly-occurring design problem — a shared vocabulary and structure for solving a class of problems, not a finished piece of code to copy-paste.
graph TD
DP[Design Patterns] --> C[Creational: object creation]
DP --> S[Structural: composing classes/objects]
DP --> B[Behavioral: communication between objects]
C --> C1[Singleton, Factory, Builder]
S --> S1[Adapter, Decorator, Composite]
B --> B1[Observer, Strategy, Command]
Advantages:
- Proven, reliable solutions — patterns are refined solutions to problems already solved and battle-tested by the wider developer community, reducing the risk of a novel, untested design.
- Common vocabulary — saying "we'll use an Observer here" instantly communicates an entire design intent to other developers, speeding up design discussions and code reviews.
- Improved maintainability — patterns like Strategy and Decorator let new behavior be added without modifying existing, tested code (the Open/Closed Principle), reducing regression risk.
- Faster development — developers don't need to design a solution from first principles for well-known problems (e.g. "how do I notify multiple objects of a state change?" -> Observer).
- Better documentation — a pattern's name itself documents why a piece of code is structured the way it is, beyond what inline comments alone would convey.
Worked example: a stock-price dashboard needs multiple UI widgets (chart, table, alert banner) to update whenever the price changes. Applying the Observer pattern, the price object maintains a list of subscribed widgets and calls a common update() method on all of them whenever its value changes — new widget types can subscribe later without changing the price object's code at all.
Exam takeaway: design patterns package proven, communicable solutions into three families — creational (creating objects), structural (composing them), behavioral (coordinating them) — and their chief benefit is faster, safer, more maintainable design reuse rather than any specific line of code.
What are the ACID properties of transaction to ensure data reliability and integrity?
Model answer
Direct answer: ACID — Atomicity, Consistency, Isolation, Durability — is the set of guarantees a database transaction must satisfy so that concurrent access and system failures never leave data corrupted or partially updated.
| Property | Guarantee | What breaks without it |
|---|---|---|
| Atomicity | A transaction is all-or-nothing: every operation commits, or none do | A failed transfer could debit one account without crediting the other |
| Consistency | A transaction moves the database from one valid state to another, respecting all constraints/rules | A transfer could violate a "balance can't go negative" rule mid-way |
| Isolation | Concurrent transactions behave as if executed one at a time (serially) | Two simultaneous withdrawals could both read the same starting balance and overdraw the account |
| Durability | Once committed, changes survive crashes/power loss | A confirmed payment could vanish after a server restart |
Worked example — a bank transfer of 500 Tk from Account A to Account B:
- Atomicity: both "debit A by 500" and "credit B by 500" must succeed together, or the whole transaction rolls back if either step fails (e.g. B's account doesn't exist).
- Consistency: before and after the transfer, total money across A and B is unchanged, and neither account violates its minimum-balance rule.
- Isolation: if another transaction is simultaneously reading A's balance, it sees either the pre-transfer or post-transfer balance — never a half-updated intermediate value.
- Durability: once the bank confirms the transfer to the customer, that result is written to persistent storage (e.g. via a write-ahead log) so it survives even an immediate server crash.
Exam takeaway: ACID exists specifically to make transactions safe under concurrency and failure — atomicity handles partial failure, consistency enforces business rules, isolation handles concurrent access, and durability handles crashes after commit.
What are the four necessary condition of deadlock in an operating system?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a C/C++ program to calcute factorial of N using recursive function.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write the recursive function of the below problem and find the recurrence relation of the function. F(n) = 1+2+3+..........+(n-1) +n
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Consider the employee tables: Create a SQL view that shows the details of Employee information who have the salary equivalent to the maximum, minimum and average salary of employee.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write appropriate linux command:
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 · Government IT officer posts guide