0% found this document useful (0 votes)
191 views9 pages

Final Exam Question, 3rd Semester (39th Batch, Fall-2023)

Hello

Uploaded by

ahsanhabibrf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
191 views9 pages

Final Exam Question, 3rd Semester (39th Batch, Fall-2023)

Hello

Uploaded by

ahsanhabibrf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 9
Daffodil International University Department of Software Engineering Faculty of Science & Information Technology Final Examination, Fall 2023 Course Code: SE 131, Course Title: Data Structure Level: 1 Term:3 Section: A,B, C, D, E Instructor: AB, RBM, SD ‘Modality: Close Book Exam Date: Tuesday 12 December 2023 Time: 08:30 AM - 10:30 AM ‘Two hours (2:00) Marks: 40 Directions: ‘Students need to go through the CASE STUDY shown in this exam paper. ‘Analyze and answer specific sections based on your own thi Answer all the questions, sequentially Suppose you have some elements to construct a Binary Search Tree, The elements are: ing and work. [CLO- 4, Level-3] [Marks-8] DHK, CTG, BAR, KUL, RAJ, VOI, SYL, MYM, RNG _& Sketch the BST, by inserting the above element sequentially (Consider alphabetical order) Ze Delete *CTG" from the tree, as you have drawn from question no ‘a’, Sketch the BST “C Insert ‘NOA" to the tree, as you have drawn from question no ‘a’, Sketch the BST Traverse the BST, found from the answer to 1 (a), by in-order and post-order method, 'p~ Mdentify the types of trees (i. full ree, Complete tree ..) from the below examples and explain them with SC © O OY Few) Fee 2. Suppose you have a graph as follows: [CLO- 4, Level-3} [Marks-8] Now: ‘Show the adjacency matrix representation of the given Graph Show the adjacency List representation of the given Graph %. Interpret the complete graph and connected Groph. 3. a, Draw the operations of a priority queue implemented using an array-based structure. The queue ean hold a maximum of 10 elements. The priorities are ordered alpliabetically. That is, A holds lowest power and Z holds highest power. Set 1 as the highest priority, then 2 , then 3 ete. ‘Now show one after other operations as given below: A oitially,‘C, ‘A,B, and 'G' are inserted. Two elements with the highest priority are deleted ) B, ‘Ds, F is inserted. iv) Two elements with the lowest priority are deleted be Interpret the Circular Queue with an example, ICLO- 3, Level-3] [Marks-4] 4, Suppose you have a student ID: 0242220005343004. Each digit in this ID, ie.,"0","2", "4","2", "2", "2 "0", "0", "0", "5", "3", "4", "3", "0°, "O", "4", will be stored as data elements in a linked list. Use only last 6 digits of your Student TD as The data Tor the linked list. Assume the following 8 memory cells are available for the linked list: 100B | 101B 102B 103B | 104B 105B 106B 107B [CLO- 3, Level-3] [Total Marks- 20) P Construct a douible-way linked list using the available memory cells and store data elements inthe list following the above instructions, and sketeh the available linked lists. (DY After constructing the double-way linked lst, as done in part‘, insert "6" asthe 6th element aid" 16" as ‘the last element of the list, and sketch the resulting linked list. Following the creation of the double-way linked list in part 'b’, delete "0" and "8" from the linked exist, and ifit exists multiple times and sketch the resulting list. BF Construct a circular linked list with flag using the available memory cells and store last 6 digits of your student ID as data elements in the list following the above instructions, and sketch the available linked list. Dy Aller constructing the circular linked lst in question number insert "1" asthe Ist element into the list, and sketch the resulting linked list. f) Following the inserion in question number''', delete "2" from the list if it exists, and if it exists multiple times, then delete the first occurrence, and sketch the resulting list. (PF Construct a circular linked lst witha sentinel value using the available memory ce'ts and store last 6 digits of your student ID a8 data elements in the list following the above instructions, and sketeh the available linked lists , By Aller constructing the circular inked list witha sentinel value in part's delete the first occurrence of "5" from the linked list if it exists, and sketch the resulting list, i) Following the insertion in part'h, insert "7", "9","1", and "6" as the last four elements into the circular inked list with a sentinel value, and sketch the resulting list, j) Write down the basic part of the code for linked list construction and print, [Subtotal 10*1.5=15 Marks} k)_ Implement a binary search tree in a C program. [Subtotal 5 marks} Daffodil Intemational University Department of Software Engineering Faculty of Science & Information Technology Final Examination, Fall 2023 Course Code: SE2I1; Course Title: Object Oriented Concepts Sections: All, Batch: 39 & Teachers: RIM, DB Time: 2:00 Hrs Marks: 40 ‘Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.) Driver Code: Public class Main { public static void main(String{] args) { Student student = new Student; student.setName("Alice Wonderland"); student setGrade(95.5); String name = student getName(); double grade = student. getGrade(); System.outprintin("Name: " + name); System out printin("Grade: "+ grade); }} Now, Construct the Student class (design class) for this above driver code using the concept of Encapsulation and Show the Output. . 4s 1 ») Imagine you are designing a music store application that manages various musical instruments. The application, es method includes a base class Instrument and two derived classes, Guitar and Piano. The code showea overloading, method overriding, and constructor overloading, Develop the full JAVA code by completing the following all task: ‘¢ Create a class named Instrument with the following variables and methods 1. variable is name: Data type String 2. Instrument(String name): assigns the value in the variable 3. play(): Takes no arguments and prints ("Playing the " + name) 4, tune(): Takes no arguments and prints ("Tuning the " + namie); © Create a class named Guitar that extends the Instrument class. 1. Guitar() 2. Guitar(String form) 3. Now, Override the play() method to print ("Strumming the guitar") 4. Thea override the tune(String tuning) method to print ("Tuning the guitar © Create another class named Piano that extends the Instrument class. 1. Pian>(String form) 2. tune(String tuning) ‘¢ Now create another class named MusicStore. In the main method of the class, ereate an object of the Instrument class named instrumental and cal the following methods 1. play) 2. tune) ‘© Then, Create an object of the Guitar class named! ukulele and call the fllo play) 2. tune("Drop D" ‘« Lastly, Creat@ an object of the Piano class named Kalimba and call the following methods: 1, tune("key 440") oe Your solution should produce the following outputs: Playing the Instrument ‘Tuning the Instrument Ukulele is the smallest form of Guitar Strumming the guitar Tuning the guitar to Drop D Kalimba is also known as Pocket piano ‘Tuning the piano to key 440 10-3 Level-3 Page 1 of 2 exception, InvalidVoterException, to handle eases where the age is not valid for voting. The TestCustomException class contains a method validateAge that checks the age against the eligibility criteria, The code for custom InvalidAge:xception class is given below: public class InvalidVoterException extends Exception { public InvalidVoterException (String message) { super(message); } } Now. Design the TestCustomExeption class based on the given InvalidVoterException class to check both valid and invalid ages for voting utilizing the concept of throw, throws, try and catch. Your programme should include: ‘e validateA ge(int age): check whether the age is between 18 or not, It will declare the exception. If the age is less than 18 throw the custom exception, InvalidVoterException © _try{}: monitor the validateAge(int age) method catch{}: handle the custom exception and display the outputs. Found the exception Exception occurred: InvalidVoterException: age is not enough to vote. ©) | Design the given scenario by drawing proper UML Diagrams, and show the association relationships. Mina is a Student. Mina has @ name, id, email of type String, int, String, Student has a registrationNo of type int and has the task of display_info of type void, Mina must have a Transcript and without this she will not be able to graduate. Transcript has a track_id of type int and provides the result_calculation service and returns the total CGPA(Ex: 3.80). : 1) | Show an abstract class called Flower with an abstract method called petal() and a concrete method color) Implement one concrete class, Jasmine, that inherits from the Flower class. Create an object of Jasmine, then execute the petal() and color(), and display information. Desired Output: Jasmine petals are edible. ‘The color jasmine is a pale tint of yellow. Petals of Jasmine moisturize our skin. at b) | Ina futuristic society where humans have developed advanced AI capabilities, you are tasked with designing a ‘virtual assistant that embodies both teacher-like and student-like characteristics. Utilize the provided Human cto class and interfaces (Teacher and Student) to create a virtual assistant named "RoboHelper." To create this oe assistant, the interface Teacher has eat() and sleep() methods, on the other hand the interface Student has a ‘work() method. Now, facilitate the derived Human class to Create an object and implement all of these methods, to create the virtual assistant. Establish the concept of Multiple Inheritance to solve the above problem. Expected Output: Teacher is eating. Teacher is sleeping. Student is working. c) | Show the output of the following code Snippets. public class JavaHungry { catch(NumberFormatException ex){ public static void main(String args{)) { System.outprint("C"); } int arr}= {0, 1,2,3,4,5}; catch(ArithmeticException ex) { ‘System out print(arr{0}); ‘System.outprint("D"); } catch(Exception ex){ System.outprint("E"); } finally { System.out print("B"); System.out.print("F");} } System out print("G"); System.out.print(arr{4); H ,] 4) | Imagine you are developing a voter eligibility verification system, and you have implemented a custom Page 2 of 2 Daffodil International University Department of Software Engineering Faculty of Science & Information Technology Final Examination, Fall 2023 Course Code: SE222; Course Computer Architecture Sections & Teachers: KBB, JNM Time: 2:00 Hrs Marks: 40 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.) 1. [4] Explain Associative mapping from main memory to cache with diagram (Marks-4] ] [P| Relate from the clock policy diagram below. Now, show the process [Marks-6] con Level- 2 2. [ph | Apply the Booths algorithm for the following values: [Marks-7] Multiplier: 5 and Multiplicand: 8 [7 | Construct the following floating point binary numbers into denary. | [Marks-3] ‘Assuming 10 bits for the mantissa and 6 bits for the exponent, both in 2°s complement. oti foto jojo ft fo fofo fifo fi fot 605 Level- TTovTifijfi[ilfo[i[i1[fof;ofifo/jo{o]|i 3 if Experiment with zero and one address representation verifying the | [Marks-4) following expressions: X= (atb+e)+[((a+b)~(c+d)}] \y Experiment with two and one address representation verifying the following | [Marks-4) expressions: 2 = (x+y) + [{(ara) + (b+b) + (C+) 3. | a)] Explain the pipeline architecture for an instruction set with 18 instructions, | (Marks-7 IC following the considerations - 2nd instruction is a branch instruction which co-4 indicates 6th instruction as the result, th instruction is another branch ee instruction which indicates 13th instruction as the result. Page ! of | G Daffodil International University Department of Software Engineering Faculty of Science & Information Technology Final Examination, Fall 2023 Course Code: STA 101, Course Title: Statistics I Sections & Teachers: (A, B, C, D) (JA2), E (UFU) ‘Time: 2:00 Hrs Marks: 40 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course ‘outcomes. All portions of each question must be answered sequentially.] 1. ] @ | Show the differences between mutually exclusive outcomes and one exhaustive outcomes? Mlustrate with a hypothetical example, cio: B | Compare between linear correlation and non-linear correlation? Mustrate | | Levet2 with example (var 7. | a) | The following table shows the amount of diesel required by a train to travel certain distances, a Distance(x km) |~_90 150 230 310 | Diesel(y liters) 19 33 49 79 | 89 [Marks-6) ‘Determine the coefficient of correlation ii) Interpret the result, 1) | Ina statistical investigation the grade point average (y) and study hour (x) | cto of a group of students in one semester are recorded as follows: Level-5 x Sipars: ie | 4 | 2 |e Tie ly 30 | 32 | 35 | 40 | 35 | 38 | 40 [Marks 2) Draw scatter plot. AY Determine the estimated regression model. | iii) Interpret the value By and B. iv) Conclude grade point average when sp2nt on study is 10 hours. 3a The fasting blood sugar (FBS) of 10 randomly selected patients are given below: 110, 118, 130, 140, 142, 146, 112, 100, 95, 122 | | | | With population standard deviation 17.5. Test for the hypothesis that the | (Marks-71 mean FBS of the patients in the population is 110 (Consider 5% significance level), 4) | The electric bulb produced in an industry are found defective at the rate of aa 2%, In an hour of a day the industry produces S00bulbs. Examine the Levers probability by choosing Poisson distribution , in that hour iy Exactly 4 defective bulbs are produced, [Marks-8] f) at least 2 defective bulbs are produced, igff-at most 2 defective bulbs are produced, (v) Find the mean of that distribution. Page 1 of 2 Th a sample of 400 students, 270 said they had a stereo, 125 said they had a TV, and 100 said they had both. 5 said they had neither. Ifa student is selected at random, Examine, i) The probability that the student has only a stereo or TV? ii) The probability that the student has both a stereo and TV? [Marks-5] Page 2 of 2 Daffodil International University Department of Software Engineering Faculty of Science & Information Technology Final Examination, Fall 2023 Course Code: BNS 101; Course Title: Bangladesh Studies Sections & Teachers: 39(A, B, C, D)-RAM; 35A-AH Time: 2:00 Hrs Marks: 40 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially. | Extend the significance of Bangabandhu’s 7 March speech in the history of | j, | CLO-3 the emergence of Bangladesh. Level-2 2, | Analyze the causes and consequences of Six Points Movement in the then East | 4, | cLo-3 > | Pakistan as per your understanding. Level-4 3,/Assess the current economic scenario of Bangladesh with relevant| .. | cro contemporary evidence. Levels | “Climate change is a result of human greed”- do you agree? Develop your own | ideas for adaptation and mitigation to the challenges of climate change in| 08 | CLo- . | Bangladesh. Level-6 a Discuss the primary strengths, weaknesses, opportunities and threats of IT] J. | cLo-s ” | sector in Bangladesh, 08 | Levels page | of 1 ‘a Daffodil International University Department of Software Engineering Faculty of Science and Information Technology Final Examination, Fall 2023 Course Code: MAT 102; Course Title: Mathematics II Sections: 39A, 39B, 39C, 39D; Teacher: AKS Time: 2 Hours mci ae Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1] _ | Identify A” from the following matrix using its canonical form: IMarks-. | CLOS He Level-3 w(t 2 -3 ) 2-163 Answer questions 2 and 3 based on the following matrix: 2 * BG 3) : 2.| _ | With the help of its characteristic equation, infer whether the Cayley- Marisa] | CLO-T Hamilton theorem holds for this matrix B. haved 3.| _ | Demonstrate how you would obtain the eigenvectors for each eigenvalue | (Marks-4] [~ CLO-1 of the matrix B. Show all your calculations. Level-2 4.| | Construct Argand diagrams showing the following complex numbers: | [Markell [1 i)-V6-V2iif)2- 28 Level-6 Hence, rewrite these numbers using the Euler's formula. For 1 = 14(Cos6; + iSin®,) and z, = r,(Cos@, + iSin®z), develop a [Marks-6) CLO proof for the following statement: Level-3 at =" (cos(o, — 6,) + isin(6, — 0,)) Eee 6. ‘Test for the following equations that the LHS and RHS are equivalent: [Marks-10) CLO-2 i) Sin30 = 3Sin@ — 45in?0_ ii) Cos?6 == Cosa +1Cos30 Level-d 7.| | Foru = y? — 3x*y, construct an analytic function whose real part isu, |Iarks-6)} CLO ef Level-6

You might also like