Partial preview of the text
Download Lab report for the lab course and more Summaries Digital Systems Design in PDF only on Docsity!
Q1 Which of the tollow'ng languages are allowed tor the CS253 class project in this semester? Max. score: 1; Neg. score: 0; Your score: 1 7 lava Cc Pytaon vac Q1 Which of the following circumstances would require a plan-driven development of software? Max. score: 1; Neg. score: O; Your score: O v The development team is distributed across the globe A BB Thelife-cycle of the project is very long W WB The software product requires certification from an external agency Vv The customers are not available during the development of the software Q2 Which of the following circumstances would suggest the use of an agile software process? Max. score: 1; Neg. score: O; Your score: 1 @ EB itisimportant to enter the market as soon as possible to avoid competition @ EB Therequirement specifications are not very clear before developing some preliminary version of the system The system is safety-critical and required exhaustive validation WV WW Thecustomer is willing to be involved in the development process Q.1 Feasibility study is performed as part of the requirement engineering process to ensure that Max. score: 1; Neg. score: O; Your score: 0 A WB the software can be developed within the budget BB the software will be bug-free if developed A IB the software will be useful for the organization BB the software will conform with the environment regulation Q2 Which of the requirements validation checks is/are the sole responsibility of the software customer? Max. score: 1; Neg. score: O; Your score: 0 Consistency Verifiability @ HE Completeness WE Realism Q1 Which of the following information are available from a use case digram? Max. score: 1; Neg. score: 0; Your score: 1 The non-functional requirements related to the interaction, for example, the time required for an interaction v WH The actors involved in some interactions with the system WEB Thename of the interactions The data transmission involved in the interactions Q2 Mathematical specification is useful for which of the following purposes? Max. score: 1; Neg. score. 0; Your score: 0 Automated generation of tests @ HB Formal Verification of the software v Automated synthesis of the software HB Formal modeling of the software system Q2 You want to develop control software for an autonomous vehicle. The software takes the images taken by the front cameras as input and produces the steering angle, braking, and acceleration amount as output. The input camera image is processed for detecting objects in front of the vehicle. The object types and locations are used to generate a motion plan. Finally, the motion plan is used to generate the final control outputs. Which of the following architecture patterns is best suited for developing this control software? Max. score: 1; Neg. score: O; Your score: O Layered Architecture v Pipe and Filter Architecture Repository Architecture Client-Server Architecture Q.4 Inthe class hierarchy of a software system, Class Ais the parent class of Class B. Which of the following is/are always true? Max. score: 1; Neg. score: O; Your score: 1 A BB An object of Class B is associated with more attributes than an object of Class A Class A cannot have any attribute An object of Class A is associated with more attributes than an object of Class The objects of Class A and Class B have equal number of attributes. Q2A patient can be given different medicines. On the other hand, a specific medicine can be prescribed for many patients. Which of the following captures the association of the classes patient and medicine correctly? Max. score. 1; Neg. score: 0; Your score: 1 14 1 Patient Medicine 1 1. v Patient Medicine 1 1 Patient Medicine 1 1 Patient Medicine Q41Astate machine of a software system has two state locations and two binary state variables, How many total states are there inthe system? Max. score: 1; Neg. score: O; Your score: 1 Vos Q2 Which of the following UML models capture the dynamic behavior of software systems? Max. score: 1; Neg. score: O; Your score: 1 Use-case diagram Class diagram Wo WE State diagram A TB Sequence diagram int main) { int val = 200; cout << val + first::val << endl; return Q; } What is the output printed by this program? Max. score: 1; Neg. score: 0; Your score: 1 300 500 v 600 400 Q2 Consider the following program: #include using namespace std; class Tree { long leaf_count; i int main() { Tree t: t.leaf_count = 500000; cout << tleaf_count << endl: return O: } What will happen if you attempt to compile and run this program? Max. score: 1; Neg. score: O; Your score: 1 @ HE The compiler will throw an error 500000 will be printed as output Compilation will be successful and the execution will terminate without printing any value The compilation will be successful but there will be a runtime error during execution Q1 What is the return type of a constructor? Max. score: 1; Neg. score: O; Your score: 1 char VW HE onoreturntype int void Q2 Consider the following program: #include using namespace std; class Point { intx, y; public: Point(inti = @, intj = @) { x = i; y=43 } int getX() { returnx; } int getY() { returny; } Max. score: 1; Neg. score: O; Your score: 1 VvH2 1 4 3 Q2 Which of the following pointers refers to the object calling a member function? Max. score: 1; Neg. score: O; Your score: 1 WW This Pointer Static Pointer Object Pointer Null Pointer Qt Consider the following program having multi-level inheritance: Note:Includes all required header files classA{ public: void print() {cout << "In A" << endl; } i class B : public A{ public: void print() {cout << "In B" << endl: } a7 class C: public B {}; int main(void) { Ca c.print(); return 0; } What is the outcome of the compilation and execution of the above program? Max. score: 1; Neg. score: O; Your score: 1 Successful compilation, but no output InA vw inB Compilation error Q2 What will be the output of the following program? Note: Add all necessary header files class Base { public: virtual void show() { cout<< "In Base" << endl; } 3b class Derived: public Base { public: void show() { cout<< "In Derived" << endl; } k Q.1 You want to create a function by overloading the subtraction operator available in C++. Which of the following is the correct name of the function? Max. score: 1; Neg. score: O; Your score: 1 operator(-) subtract W EE operator- Q2 Which of the following catch statements is used to catch any exception? Max. score: 1; Neg. score: O; Your score: 1 catch (const char* msg) WEB catch(..) catch() catch (all) Q.1 Which of the following is/are the goal(s) of secure programming? Max. score: 1; Neg. score: O; Your score: 1 To secure the program from getting updated by other programmers To ensure that the code is error-free during normal operation To improve the readability of the code @ HB To prevent the program from producing erroneous results when some attacker deliberately attempts to do so Q2 Suppose you want to ensure that the value of a variable balance should never be less than O at some location in your code written in C++. Which one of the following is the correct assert statement to be placed at that location? Max. score: 1; Neg. score: O; Your score: 1 assert (\(0\)): assert (\(balance < O\)); assert (\(balance > 0\)): WA EB assert (\(balance >= 0\)): Q1 What will be the output of the following bash script? a=2 b=3 c=$at$b echoc Max. score: 1; Neg. score: O; Your score: 1 2 Voc 5 3 Q2 Which of the following commands will always produce nothing on the screen? Max. score: 1; Neg. score: 0; Your score: 1 Is-latxt b.txt > outfle AS WE ls-l atc btxt & allfile Is-l atxt b.txt 2> /dev/null Is -l a.txt b.txt 2> errfile Q1 What is a phony target ina makefile? Max. score: 1; Neg. score: O; Your score: 1 The default target for the make command WHA target which is not a filename Atarget which is not used with the make command Atarget which is a flename Q2 Suppose that you have a makefile named "makexe" that has been written to generate an exe file "shaper". Which of the following command will generate the file "shaper" successfully? Max. score: 1; Neg. score: O; Your score: 1 make makexe make A HB omake -f makexe shaper make makexe shaper Q41 Which of the following type of testing is/are not performed by the software development team? Max. score: 1; Neg. score: 0; Your score: 1 @W WE Acceptance testing Unit testing System testing Component testing Q2 Consider the following function: int function(int a, int b) { return; } Which of the following is/are test case(s) for the above function? Max. score: 1; Neg. score: 0; Your score: 1 ~ HM 2=0 b=0,x=0 oY Mo 2=5,b=10,x=15 a=5 a=5,b=40 Q41 Consider the following conditional statement: If ((a >0) || (b >0)) cout << "Hello" << endl; else cout << "Bye" << endl: Which of the following test suites provides more than 0% decision coverage for the above conditional statement? Max. score: 1; Neg. score: O; Your score: @ (a=0,b=0,” Bye”), (a=1,b=0,” Hello”) @ (a=0,b=0,” Bye”), (a=1,b=1,” Hello”) (a=1,b=0,” Hello”), (a=0,b=1,” Hello”) @ (a=0,b=0,” Bye”), (a=0,b=1,” Hello”)