BUET M.Sc. Admission — Department of ICT — May: 2019প্রশ্ন ও সমাধান
- Set by
- BUET M.Sc. Admission
- Exam date
- 2019
- Questions
- 23 (0 MCQ, 23 written)
- Exam guide
- M.Sc. admission (CSE and ICT) · এমএসসি ভর্তি (সিএসই ও আইসিটি)
- Algorithms · অ্যালগরিদম 5
- Programming · প্রোগ্রামিং 5
- Software Engineering · সফটওয়্যার ইঞ্জিনিয়ারিং 4
- Computer Architecture · কম্পিউটার আর্কিটেকচার 2
- Data Structures · ডেটা স্ট্রাকচার 2
- Database · ডেটাবেজ 2
- Digital Logic · ডিজিটাল লজিক 1
- Mathematics · গণিত 1
- Networking · নেটওয়ার্কিং 1
F1 = A+B and F2 = AB. (a) Use the minimum NAND gate for F1 and F2 and (b) Use the minimum NOR gate for F1 and F2.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
For graph representation where vertices are 100 edges are more than 300 which will be preferred?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Bellman-Frod Algorithm with negative weight.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Enqueue and Dequeue using signle linked list in O(1) time.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Wite assembly code for push and pop using given instructions [MOV A, B ADD A, B ADD A, K].
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
How Creating object of Inner class?
Model answer
A non-static inner class cannot be instantiated on its own — it needs an existing instance of its enclosing (outer) class, because every inner-class object implicitly holds a reference back to the outer object that created it.
class Outer {
int x = 10;
class Inner { // non-static inner class
void show() {
System.out.println("Outer x = " + x); // can access outer's members directly
}
}
}
public class Main {
public static void main(String[] args) {
Outer outer = new Outer(); // step 1: create outer instance
Outer.Inner inner = outer.new Inner(); // step 2: create inner via outer instance
inner.show();
}
}
Output: Outer x = 10
Two ways, depending on the inner class's kind:
| Kind | Instantiation syntax | Needs outer instance? |
|---|---|---|
| Non-static inner class | Outer.Inner obj = outerObj.new Inner(); |
Yes |
| Static nested class | Outer.Inner obj = new Outer.Inner(); |
No |
classDiagram
class Outer { +int x }
class Inner { +show() }
Outer *-- Inner : outer.new Inner()
- The
outerObj.new Inner()syntax exists precisely because a non-static inner class instance carries a hidden reference to its enclosing instance (accessible internally asOuter.this), letting it freely use the outer object's fields/methods (asshow()does withxabove).
Exam takeaway: new Inner() alone fails to compile for a non-static inner class — always instantiate as outerInstance.new InnerClass(), unless the inner class is declared static, in which case it behaves like a top-level class.
Update SQL update the price i) rise cost by 10% when cost <500; ii) less cost by 10% when cost>1000?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Fill in blank with trigger SQL.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Construct NFA that accepts binary strings having odd number of 1's or even number of 0's.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Class digram of an online shopping website.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
State diagram for the avove website.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Software maintenance life cycle.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What is unit testing and acceptance testing explain it with example?
Model answer
Unit testing verifies the smallest testable piece of code (a single function/method/class) in isolation; acceptance testing verifies the whole system against business/user requirements — they sit at opposite ends of the testing pyramid.
| Aspect | Unit Testing | Acceptance Testing |
|---|---|---|
| Scope | Single function/method/class | Entire system/feature end-to-end |
| Performed by | Developers | Client/end-users/QA (with business input) |
| When | During coding, continuously | Near the end, before release |
| Goal | Code behaves correctly in isolation | System meets business requirements |
| Tools (example) | JUnit, pytest, Google Test | Manual UAT scripts, Selenium/Cucumber |
| Failure means | A logic bug in that unit | The product doesn't satisfy what was asked for |
graph TD
U[Unit Tests - individual functions] --> I[Integration Tests - modules together]
I --> S[System Tests - whole application]
S --> A[Acceptance Tests - business requirements]
Worked examples:
- Unit test: for a function
add(a, b), assertadd(2, 3) == 5— tests only that one function, with all dependencies mocked/stubbed out. - Acceptance test: for an e-commerce checkout feature, a tester (or the client) walks through "add item to cart -> pay -> receive order confirmation" exactly as a real customer would, and signs off only if the complete business flow works as specified in the requirements document.
Exam takeaway: unit testing answers "is this piece of code built correctly?" (verification); acceptance testing answers "did we build the right product for the customer?" (validation) — both are essential but check fundamentally different things.
Describe a state space explaining when IDDFS performs worse than DFS?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Given a C code using pointers. Explain if there is any problem with this code. If not, then what is the output?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Draw relationship diagram for P, NP, NP hard and NP complete.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Write a function to reverse a string without using global variable?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Elimination of left recurson.
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Given an assembly code, what are its limitations?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Given network address 172.16.0.0 where 512 subnets and 100 hosts per subnet are needed. What should be the subnet mask?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Given a Java code using strings, what is the output?
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Compute the sum of palindrome numbers between 100 and 999 (like 101, 313 etc.).
Sign up free to see the model answer · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Short question:
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 · M.Sc. admission (CSE and ICT) guide