BUET M.Sc. Admission Department of ICT Exam 2019 — Question Solution | বুয়েট এমএসসি ভর্তি নিয়োগ পরীক্ষা ২০১৯ — প্রশ্ন সমাধান
- BUET M.Sc. Admission
- 2019
- 20 questions · 0 MCQ, 20 written
Page updated
ARBS Academy · itjobs.arbsacademy.com
About this exam paper · প্রশ্নপত্র পরিচিতি
The BUET M.Sc. Admission Department of ICT exam was held in 2019. The paper had 20 written questions. The subjects asked most were Algorithms (5), Software Engineering (4) and Programming (3). This page lists every question, with 2 answered and explained; the rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
বুয়েট এমএসসি ভর্তি নিয়োগ পরীক্ষার (২০১৯) এই প্রশ্নপত্রে ২০টি প্রশ্ন ছিল, বেশিরভাগ অ্যালগরিদম ও সফটওয়্যার ইঞ্জিনিয়ারিং থেকে। এখানে ২টি প্রশ্নের ব্যাখ্যাসহ উত্তর দেওয়া আছে; বাকিগুলো ফ্রি অ্যাকাউন্টে খোলে।
- Organisation
- BUET M.Sc. Admission
- Exam date
- 2019
- Questions
- 20 (0 MCQ, 20 written)
- Exam guide
- M.Sc. admission (CSE and ICT) · এমএসসি ভর্তি (সিএসই ও আইসিটি)
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.
For graph representation where there are 100 vertices and more than 300 edges, which representation (adjacency matrix or adjacency list) will be preferred?
Java code find output:
public class Demo {
public static void main(String[] args) {
double values[]={-2.3, -1.0, 0.25, 4};
int cnt = 0;
for (int x=0; x < values.length; x++) {
if(Math.round(values[x]+.5) == Math.ceil(values[x])) {
++cnt;
}
}
System.out.println("same results" + cnt + " time(s)");
}
}
Explain the Bellman-Ford algorithm for finding shortest paths in a graph with negative edge weights.
Implement Enqueue and Dequeue using a singly linked list in O(1) time.
Write assembly code for push and pop using the given instructions [MOV A, B; ADD A, B; ADD A, K].
Sign up free to see the model answers to written questions 1–6 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
How do you create an object of an inner class?
Model answer
An object of a non-static inner class can be created only through an object of its outer class, because every inner object keeps a hidden reference to the outer object that created it (Outer.this). The syntax is
Outer.Inner ref = outerObject.new Inner(arguments);
A static nested class needs no outer object: Outer.Nested ref = new Outer.Nested();
Program
public class University {
private String name;
University(String name) {
this.name = name;
}
class Department { // non-static inner class
String title;
Department(String title) { this.title = title; }
void show() {
System.out.println(title + " of " + name); // uses the outer field
}
}
static class Rules { // static nested class
void show() { System.out.println("Rules: no outer object needed"); }
}
Department open(String title) {
return new Department(title); // inside an instance method: this.new
}
public static void main(String[] args) {
University du = new University("DU");
University.Department cse = du.new Department("CSE"); // way 1
cse.show();
University.Department eee =
new University("BUET").new Department("EEE"); // way 2
eee.show();
University.Department math = du.open("Math"); // way 3
math.show();
University.Rules r = new University.Rules(); // static nested
r.show();
class Hall { // local class
void show() { System.out.println("Hall inside main"); }
}
new Hall().show();
Runnable bell = new Runnable() { // anonymous class
public void run() { System.out.println("Bell rings"); }
};
bell.run();
}
}
Output
CSE of DU
EEE of BUET
Math of DU
Rules: no outer object needed
Hall inside main
Bell rings
Ways to create the object
| Kind of class | Where the object is created | Syntax |
|---|---|---|
| Non-static inner | outside the outer class, outer object exists | du.new Department("CSE") |
| Non-static inner | outer object made on the spot | new University("BUET").new Department("EEE") |
| Non-static inner | inside an instance method of the outer class | new Department(title) (means this.new Department(title)) |
| Static nested | anywhere | new University.Rules() |
| Local class | inside the block that declares it | new Hall() |
| Anonymous class | at the point of declaration | new Runnable() { ... } |
Explanation
cse.show()printsCSE of DUbecause theDepartmentobject made throughdureadsnameof thatUniversityobject;eeewas made through theBUETobject, so it printsEEE of BUET. An inner class can read evenprivatefields of its outer object.new Department("CSE")written directly in the staticmaindoes not compile: javac saysnon-static variable this cannot be referenced from a static context, since there is no outer object. From another class,new University.Department("CSE")fails withan enclosing instance that contains University.Department is required.- The compiler stores the classes as
University$Department.class,University$Rules.class,University$1Hall.class(local) andUniversity$1.class(anonymous).
Exam tip: inner (non-static) class → outerRef.new Inner(); static nested class → new Outer.Nested(); inside an instance method of the outer class a plain new Inner() works because this is the outer object.
Update SQL update the price i) rise cost by 10% when cost <500; ii) less cost by 10% when cost>1000?
Construct NFA that accepts binary strings having odd number of 1's or even number of 0's.
Draw the class diagram of an online shopping website.
Draw a state diagram for an online shopping website.
Explain the software maintenance life cycle.
Sign up free to see the model answers to written questions 8–12 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
What are unit testing and acceptance testing? Explain them with examples.
Model answer
Unit testing is the lowest test level: each unit (a function, method or class) is tested on its own, separated from the rest of the system, to check that it matches its detailed design. Acceptance testing is the highest level: the complete system is tested by or for the customer against the user requirements and business needs, to decide whether the software can be accepted and released.
flowchart LR
U["Unit testing"] --> I["Integration testing"]
I --> S["System testing"]
S --> A["Acceptance testing"]
1. Unit testing
- Done by developers during coding, usually automated (JUnit, pytest/unittest, Google Test).
- Mostly white-box: the tester knows the code and aims at statement and branch coverage.
- Isolation: a stub stands in for a module the unit calls, and a driver (or test runner) calls the unit and feeds it test data.
Example: a function that converts marks out of 100 into a letter grade (A+ for 80–100, A 70–79, A− 60–69, B 50–59, C 40–49, D 33–39, F 0–32), tested at its boundary values.
import unittest
def letter_grade(marks):
"""Return the letter grade for marks out of 100."""
if not 0 <= marks <= 100:
raise ValueError("marks must be 0-100")
for cut, grade in [(80, "A+"), (70, "A"), (60, "A-"), (50, "B"),
(40, "C"), (33, "D")]:
if marks >= cut:
return grade
return "F"
class TestLetterGrade(unittest.TestCase):
def test_boundaries(self):
self.assertEqual(letter_grade(80), "A+")
self.assertEqual(letter_grade(79), "A")
self.assertEqual(letter_grade(33), "D")
self.assertEqual(letter_grade(32), "F")
def test_extremes(self):
self.assertEqual(letter_grade(100), "A+")
self.assertEqual(letter_grade(0), "F")
def test_invalid_input(self):
with self.assertRaises(ValueError):
letter_grade(101)
with self.assertRaises(ValueError):
letter_grade(-1)
if __name__ == "__main__":
unittest.main(verbosity=2)
Output:
test_boundaries (__main__.TestLetterGrade.test_boundaries) ... ok
test_extremes (__main__.TestLetterGrade.test_extremes) ... ok
test_invalid_input (__main__.TestLetterGrade.test_invalid_input) ... ok
----------------------------------------------------------------------
Ran 3 tests in 0.000s
OK
If someone changes 80 to 81 by mistake, test_boundaries fails at once and points to this one function.
2. Acceptance testing
- Done by the client, end users or an independent team on the finished system, in a production-like environment.
- Black-box: based on the requirements (SRS) and acceptance criteria, not on the code.
- Forms: user acceptance testing (UAT), alpha testing (users at the developer's site), beta testing (real users at their own sites), contract and regulatory acceptance testing.
Example: an online exam-result portal. Acceptance criterion: Given a student with a valid roll and registration number, when the student submits them, then the GPA and subject-wise grades appear within 3 seconds; an invalid roll shows "Result not found". Officials of the board run these scenarios on the complete system; if every criterion passes they sign the acceptance report and the portal goes live.
| Point | Unit testing | Acceptance testing |
|---|---|---|
| Level | Lowest | Highest (last before release) |
| Object tested | One function, method or class | Whole system |
| Done by | Developers | Client, users, independent testers |
| Basis | Detailed design, code | User requirements, acceptance criteria |
| Technique | Mainly white-box | Black-box |
| Question answered | Is the unit built right? | Is it the right system for the user? |
Exam tip: give one concrete test case for each (input and expected result for the unit, a user scenario with pass criteria for acceptance) and mention alpha and beta testing as kinds of acceptance testing.
Describe a state space explaining when IDDFS performs worse than DFS?
Draw relationship diagram for P, NP, NP hard and NP complete.
Write a function to reverse a string without using global variable?
Explain the elimination of left recursion from a grammar.
Given network address 172.16.0.0 where 512 subnets and 100 hosts per subnet are needed. What should be the subnet mask?
Compute the sum of palindrome numbers between 100 and 999 (like 101, 313 etc.).
Short question:
- Which topology will be if each device connected with each other?
- What is subnetting?
- What is ARP?
- What is MAC address?
- Shortening IPv6 Addresses: 2041:0000:140F:0000:0000:0000:875B:131B
Sign up free to see the model answers to written questions 14–20 · উত্তর দেখতে বিনামূল্যে সাইন আপ করুন
Explanations © ARBS Academy
Keep going with a free account · ফ্রি অ্যাকাউন্টে যা যা করতে পারবেন
18 more answers from this paper open with a free account.
এই প্রশ্নপত্রের আরও ১৮টি উত্তর, ধাপে ধাপে ব্যাখ্যাসহ, ফ্রি অ্যাকাউন্টে খুলবে।
Free account · 1 day of Premium free
Paper analysis · প্রশ্নপত্র বিশ্লেষণ
Its questions come from 16 syllabus chapters; Language Basics & Syntax, Object-Oriented Programming and Requirements & Design lead, with 2 each. Language Basics & Syntax is asked in 122 other papers too (2015–2026).
Its biggest topics · প্রধান টপিক
Questions in this paper, and how many of our other papers ask the topic
- Language Basics & Syntax Programming · 122 other papers, 2015–20262
- Object-Oriented Programming Programming · 88 other papers, 2015–20262
- Requirements & Design Software Engineering · 50 other papers, 2016–20262
- Theory of Computation & Compilers Algorithms · 20 other papers, 2017–20262
- IP Addressing & Subnetting Networking · 133 other papers, 2012–20261
- SQL & Queries Database · 93 other papers, 2015–20261
From our own past papers: each question filed under one syllabus chapter. Practice and held questions are not counted.
Questions about this paper · সাধারণ প্রশ্ন
- How many questions were in the BUET M.Sc. Admission Department of ICT exam (2019)?
- 20 written questions.
- Which subjects were asked most in the BUET M.Sc. Admission Department of ICT exam (2019)?
- Algorithms (5), Software Engineering (4) and Programming (3), out of 20 questions.
- When was the BUET M.Sc. Admission Department of ICT exam held?
- In 2019. The exact day isn't in our records.
- Where can I find the BUET M.Sc. Admission Department of ICT exam (2019) question solution?
- On this page: 2 of the 20 questions are shown with worked answers. The rest of the answers open with a free ARBS Academy account, where the paper can also be practised as a timed test.
Question text is from the public recruitment exam; answers and explanations are written by ARBS Academy. All past papers