Showing posts with label Software_Arch_quiz. Show all posts
Showing posts with label Software_Arch_quiz. Show all posts

Friday, April 10, 2015

Software Architecture Quiz 3

1.If you want to create a modular design in C, which of the following C language features represent interfaces ?
Select one:

Header files (.h files) {correct}
Loop constructs
Struct keyword
Union keyword

2.You are writing a software for a soccer game  where your team, comprising of multiple players will play with another team. Your player needs to pass a ball in various ways- like a short pass, long pass, back pass, dribble and then pass. What's the design pattern you should use to implement passing a ball

Select one:

strategy pattern {correct}
command pattern
observer pattern
visitor pattern

3.Suppose that you have a data represented in a graph form. You want to create two types of reports, say a PDF report and a text report that traverses this graph and generates report. You don't want the data structure to know the report generation logic. What design pattern would you choose?

Select one:

Visitor {correct}
Singleton
Strategy
Observer

4.Suppose you are given a list of numbers as \{10,-6,8,9,0\}. You can sort these numbers via bubble sort, insertion sort and so on. This is an example of 

Select one:

Iterator
Singleton
Strategy {correct}
Observer

5.There exists three techniques to copy a text from one location to another (either by pressing ^C or selecting copy icon or by selecting copy option from edit menu). This is an example of ...

Select one:

Adapter Pattern
Strategy Pattern
Observer Pattern
Decorator Pattern {correct}

6.Consider the statement(s) in sequence \:  LinkedList l1 \= new LinkedList();LinkedList l2 \= new LinkedList();l1.add(l2); l1.add(new ArrayList()); Which Design Pattern is most appropriate in this scenario ?

Select one:

Decorator
Composite {correct}
Factory Method
Observer

7.Retriving the elements of a collection object is an example of

Select one:

Iterator Pattern {correct}
Factory Method Pattern
Decorator Pattern
Singleton Pattern

8.The concepts of source, event and listener  is used in which of the following pattern?

Select one:

Strategy
Singleton
Observer {correct}
Iterator

9.Suppose you are given an input stream you want to read its records one by one. Which of the following design 

patterns will you use?

Select one:

Strategy
Singleton
Iterator {correct}
Observer

10.Which of the following is an idiom type design pattern?

Select one:

Iterator
Observer
Singleton {correct}
Strategy

11.In a typical MS-word document, you have the features of coloring an individual character or a word or a line or sentence or the whole paragraph or the whole document. Which design patterns are involved in this situation?

Select one:

Factory Method and Singleton
Composite and Strategy
Decorator and Composite {correct}
Strategy and Visitor

12.A website is giving an option to change its featured like themes/colour at "run time" but the basic layout will be same. It is giving an option to change or revert the changes. Which kind of design pattern should we use to implement this scheme for a particular layout.

Select one:

factory
strategy
observer
decorator {correct}

13.Which one of the following is an example of Idiom type design pattern?

Select one:

Factory Method {correct}
Adapter
Decorator
Visitor

14.Suppose you are given an input stream you want to read its records one by one. Which of the following design 

patterns will you use?

Select one:

Singleton
Observer
Iterator {correct}
Strategy

15.You need to provide a new layout for a container component. The layout can chosen at runtime. What pattern 

would you use?

Select one:

Composite Pattern
Decorator Pattern {correct}
Factory Method Pattern
Strategy Pattern

16.You have a graph data structure which you don't want to change. If you want to implement different graph traversal algorithms, what design pattern would you choose?

Select one:

Decorator
Command
Visitor
Strategy {{correct}}

17.MS-Word software application  provides various text editing helper methods such as copy a text from one location to another, cut a portion of a text, paste from  buffer, undo a previous command etc. Which design 

pattern is used here?

Select one:

strategy {{correct}}
visitor
observer
command

18.A MS-word application provides mechanism for aligning the typed text (either left or right or centre justified). 
This is an example of which type of pattern?

Select one:

None of the above {correct}
Adapter
Observer
Factory Method

19.Consider an application which writes a log message by making a call to Logger.log(String msg). This logger class in turn uses a third party library that sends this log message via email. What pattern should Logger class 

use for this purpose?

Select one:

Decorator Pattern
Adapter Pattern {correct}
Composite Pattern
Strategy Pattern

20.You have a simple database application that takes a SQL string and returns you the result. This database application is so designed that it can run remotely, or can even run as a part of your application. Your application wants to use this database but you don't want your application to understand the details of how to connect to the database and other communication related information. What should you implement? 

Select one:

client side stub {correct}
Singleton design pattern
server side skeleton
Composite design pattern

21.You are fetching data from a NO-SQL platform where the table structure is quite dynamic. It can change depending on the nature of the data. You wouldn't like to change your application everytime the table structure changes. What's the pattern you should use?

Select one:

broker
microkernel
reflection {correct}
blackboard architecture

22.You are implementing an real-time bulletin board where notices are posted continuously. All the students registered for a type of notice will be intimated whenever a new notice of that type is posted. What  pattern is used for this kind of application

Select one:

observer {correct}
command
visitor
strategy

Tuesday, March 17, 2015

Software Architecture Quiz 2

1.You are fetching data from a NO-SQL platform where the table structure is quite dynamic. It can change depending on the nature of the data. You wouldn't like to change your application everytime the table structure changes. What's the pattern you should use?

Select one:
microkernel
broker
blackboard architecture
reflection {correct}

2.Layered architecture style is best suited to develop the software applications which require

Select one:
the components to be easily replaceable {correct}
information separating as a dominant factor
the performance quality as a dominant factor
the high security of its data contents

3.A typical component may have some features available for global use but some features are for its personal use. Which quality tactic it is employing ?

Select one:

Hide Information {correct}
Shadow Operation
Separate interface from implementation
Record Playback

4.Writing an exception handling code in any GUI application is an example of

Select one or more:
Fault Recovery {correct}
Fault Prevention
Preventing Ripple effect
Fault Detection {correct}


5.Consider a cloud based data center which runs a VMWare based virtualized platform. You are running an application on top of a MacOS which is essentially a virtual machine running on top of VMWare hypervisor. What role does the MacOS play here ?

Select one:

microkernel module
adapter
external servers {correct}
internal server


6.Consider a database application where you don't want your application to have hard-coded names of the database columns. You also don't want the number of columns to be hard-coded in your application. If the structure of the table is changed, you want your application to adjust it at runtime. What is the architectural pattern you would consider here?

Select one:

Microkernel
pipe and filter
reflection{correct}
model view controller
layered pattern


7.A person needs to implement a web based scientific calculator. Here the user interface will display numeric keypad, and mathematical operation buttons like arithmetic (+,-,/,*), scientific and statistical functions. Based upon the operations system calculates the expression at the back-end and provide appropriate output, which kind of architecture pattern is best suitable for this kind of software.

Select one:

none of the above
model-view-controller{correct}
pipe and filter
corba


8.The concepts of push/pull type of pipelines are used in ...

Select one:

Layered Architectural Style
MVC Architectural Style
Pipe-and-Filter Architectural Style{correct}
Broker Architectural Style


9.Polymorphism allows

Select one:

set parameters at startup
late binding of operations{correct}
early binding of operations
component replacement

10.In a distributed system when two remote components exchange data, who is responsible for data transformation and transmission ?

Select one or more:

Bridge
Broker
Skeleton{correct}
Client Stub{correct}

11.You need to test the response time of an online shopping system based on an assumption that the access to the system by one customer is independent of another. Furthermore, there is an expected number of access requests using which you need to simulate the access requests fpr testing. What kind of stimulus you should use

Select one:

stochastic model of access requests {correct}
fixed number of access requests
periodic access requests
sporadic access requests

12.Suppose that you are building an web-based online shopping application. What is(are) the appropriate architectural patterns?

Select one or more:

Microkernel
model view controller{correct}
blackboard
layered pattern{correct}
pipe and filter


13.Which quality attribute would you consider most important for the development of Google type search query system?

Select one:

Modifiability
Testability
Performance {correct}
Security


14.The observers are associated with ...

Select one:

MVC Architectural Style{correct}
Broker Architectural Style
Layered Architectural Style
Pipe-and-Filter Architectural Style


15.Consider a space-rover system that receives various types of input signals like temperature and pressure of the environment, speed of descend at any given point in time, image of the surface, and wind speed and direction. These inputs are converted into a set of numeric data points for further processing. Based on the speed of descend, it may have to adjust and activate the upward thrust or a parachute. If there is an obstacle, it may have to change its direction so that after falling it does not damage the internal parts. These decisions are difficult to hard-code as a systematic workflow. What architectural pattern would be most appropriate here?

Select one:

blackboard {correct}
Reflection
model view controller
pipe and filter
Microkernel

16.Suppose that you are to design a gmail like mail system. The incoming mails are scanned for different security checks at different level one after other. Each level has its own functionality and depends on input from previous levels.For designing such system, what is the best possible architecture that can be used for this situation.

Select one:

Microkernel
model view controller
layered architecture
pipe and filter{correct}


17.It is possible to define a concurrency view using the module decomposition. Therefore, concurrency view is not a absolute necessity.

Select one:

False {correct}
True
http://www.ece.ubc.ca/~matei/EECE417/BASS/ch07lev1sec2.html

18.You are writing a software for a Robocup tournament where your team, comprising of multiple Robots will play a soccer game with another opponent. What should be your architectural strategy to write the overall controlling software for your robot?

Select one:

use reflection pattern for flexibility
use microkernel architecture
use blackboard based design {correct}
use broker pattern for distributed computing


19.A complex portal's user-interface part interacts with a set of web-servers. These web-servers, depending on the request type, routes it to the appropriate application service which process the request. The webserver then returns the response to the user-interface. Here what is the role of the webserver?

Select one:

blackboard
pipe
broker{correct}
kernel
controller


20.If you want to create a modular design in C, which of the following C language features represent interfaces ?

Select one:

Union keyword
Header files (.h files) {correct}
Struct keyword
Loop constructs


21.Which of the following view can be used to analyze the network traffic.?

Select one:

Use case View
Class view
Concurrency View
Deployment view {correct}
http://www.ece.ubc.ca/~matei/EECE417/BASS/ch07lev1sec2.html

22.Which of the following structure does not describe the static property of a software architecture?

Select one:

Software deployment structure
Software runtime structure {correct}
Software code structure
software management structure

23.Which of the following has maximum impact on the performance of the system.

Select one:

Support User Initiative
Enhance Concurrency
Separate User Interface {correct}
Support System Initiative

24.If you have to design a system that reads a set of student marks for the last 10 years from a file, on which you need to select fall semester marks, then you need to group these marks based on various subjects, sort these records based on marks, and finally report the sorted marks and a statistical trend analysis (mean, median, etc.). Which architectural style would you prefer

Select one:

pipe and filter {correct}
Microkernel
model view controller
blackboard

Monday, February 9, 2015

Software Architectures quiz 1

1.Resynchoronizing the state of a repaired component with the current state of operation and then re-introducing this component is the tactic for improving
Select one:
Security
Performance
Testability
Availability {correct}

2.There are two applications with the following operational failure characteristics on a given day. Application 1 crashed 10 times and it took 5min to restart every time after the crash. Application 2 crashed 20 times and it took 2min to restart. Which one has a better availability?
Select one:
their availability values can't be compared
1 has the better availability
2 has the better availability{correct}
1 and 2 has more or less the same availability

Availability = Total time system available / total period of time

3.While describing a deployment containing hardware infrastructure, you should
Select one:
show a relationship between a package and a hardware infrastructure
show relationship between a process component and a hardware infrastructure {correct}
show relationship between a hardware component and a software module/sub-modules
show a relationship between a module and a data item that the module uses

4.To capture data store and access to data from the store by various components you use
Select one:
component connector structure{correct}
work-allocation of modules
component and hardware dependency
Module dependency structure

5.An on-line tax-filing application uploads the form-16 document from the employer and it fills the tax return form of an employee once she logs into the system. The file-tax-return button submits the return form and also deducts additional tax amount from her registered credit card. From quality attribute perspective, this application improves
Select one:
performance
availability
usability{correct}
interoperability

6.Authorizing the user is a ........
Select one:
Availability tactic
Security tactic {correct}
Performance tactic
Usability tactic

7.Denial of Service attack affects the availability of the system.
Select one:
True {correct}
False

8.Which of the following is not a performance tactic?
Select one:
Resource Demand
Resource Monitor {correct}
Resource Arbitration
Resource Management

9.Module B calls an API of A using a remote method invocation. What is the dependency that is eliminated in this case?
Select one:
type of data returned by A
location of A {correct}
sequence of data generated by A
quality of data created by A

10.A module B expects A to write the count of total transactions handled at a particular memory location. The dependency of B on A is of
Select one:
Location dependency
Data type dependency
Data semantics dependency{correct}
Sequence dependency

11.Adding an intermediate component between two interacting modules in an application will improve the Select one:
Availability of the System
Reliability of the System
Security of the System
Modifiability of the System{correct}

12.The architect designs the allocation of services to hosts so that only limited services are available on each host. It will help to improve
Select one:
Modifiability of the System
Reliability of the System
Availability of the System
Security of the System{correct}

13.There is a monitor that records the status of the system during runtime. This is an example of
Select one:
Security tactic
Testability tactic
Modifiability tactic
Availability tactic{correct}

14.A software system crashed 100 times in the first year of its service and each time it crashes it needs 10 minutes to restart it. What is the average reliability of the system in hours?
Select one:
88 Hours (Approx){correct}
108 Hours (Approx)
146 Hours (Approx)
128 Hours (Approx)

15.There are several modules that calls a service provided by A. What is the implicit dependency on A?
Select one:
Quality of service provided by A
Semantics of the result generated by A
The assumption that A exists when calling the service of A{correct}
the fact that A shares the same memory location of these calling modules

16.In a GUI application, when a user presses a button an action event is generated. What is action event in a general quality scenario?
Select one:
Response
Stimulus{correct}
Source
Artifact

17.Reduction of coupling between modules is a tactic for
Select one or more:
Availability tactic
Testability tactic{correct}
Modifiability tactic{correct}
Security tactic

18.Checkpointing and rollback of a system is a
Select one or more:
Performance tactic
Security tactic {correct}
Usability tactic
Availability tactic {correct}

19.A real-time system needs to be stopped 5 times a day due to massive data-collection that requires cleaning and backup. The system needs to be restarted after 10 minutes interval each time. What is % availability of the system in a day?
Select one:
99% (Approx)
100% (Approx)
98% (Approx)
97% (Approx){correct}


20.The constituent parts of the architecture of a system are
Select one:
its classes, concurrency and the rules governing their interactions
its connectors, concurrency and the rules governing their interactions
its classes, connectors and the rules governing their interactions
its components, connectors and the rules governing their interactions{correct}

21.A camera based sensor continuously tracks the position of a moving object and sends the position to a robot management software. The robot management software triggers the action only if the difference between the received position data and the most recently registered data is > a threshold. The dependency on the sensor module can be best described as
Select one:
location of the sensor module
semantics of the position data
sequence of the streamed position data
data quality dependency{correct}

22.A malware periodically scrapes certain portion of the memory used by a point-of-sale software which temporarily stores credit card in memory. The malware exploits
Select one:
sequence of data written by the software
resource behavior of the software {correct}
published API of the software to read credit card
location of the software