CS504 Software Engineering - I Online Quiz No. 04 Solution and Discussion Fall 2013 Due Date Feb 4, 2014 11:59 PM

Dear Students,

Fourth graded quiz of CS504 (Software Engineering -I) will be held from Monday, February 03, 2014 To Tuesday, February 04, 2014. Quiz will be from Lecture # 26 to Lecture # 33. Quiz will be based upon Multiple Choice Questions. It will be opened for 48 hours.

All the instructions for solving will be there in Quiz interface. Kindly make sure, you have read the instructions before attempting Quiz.

If any student failed to attempt the quiz in given time then no re-take or offline quiz will be held.

Best of Luck
Regards,
Instructor CS504

Views: 4142

Replies to This Discussion

Thanks

Q.10

May not used when response is obvious

  • Comma is very dangerous because

Compiler does not recognize it

It creats linkage problem

Side effects

All of the above

  • C++ header files have extention----& source files have extention------

.h & .cpp

  • Names representing methods & functions should be---- & written in mixed case starting with ------

Verb & lower

  • Str=0; more inline with

Str=’\0’;

  • Code should not be

Commented

Cryptic

  • MVC stands for

Model view controller

  • Logical operators r evaluated from

Left to right

  • A self documenting code is that explains itself without need of comments & extraneous documentation, like

Flow charts

UML diagram

PFS diagram

All

  • ---- & ------- r important short circuiting logical operators a.AND, b. OR, c. NOT, d.NOR

A & b

 

Question # 1 of 10 ( Start time: 06:15:15 PM ) 

STL Stnads for ------------------

  • Standard Template Library

Standard Type Link

Standard Tempo Line

None of the given

Question # 2 of 10 ( Start time: 06:16:10 PM ) Total Marks: 1

Three tier architecture contains ------------- layers

Select correct option:

Presentation

Application

Database

  • All of the above

Question # 3 of 10 ( Start time: 06:17:05 PM ) Total Marks: 1

Which of following is/are among ten things, which the basic template

of GOF design pattern includes.

Select correct option:

Problem

Context

Forces

  • All of the given

Question # 4 of 10 ( Start time: 06:18:40 PM ) Total Marks: 1

Vertical partitioning is also known as…..

Select correct option:

Balancing

Mutating

Parallelizing

  • Factoring

Question # 5 of 10 ( Start time: 06:20:06 PM ) Total Marks: 1

Patterns are devices that allow programs to share knowledge about

their -------------.

Select correct option:

Code

Design

Analysis

None of the given

Question # 6 of 10 (Start time: 06:22:07 PM) Total Marks: 1

Client server model tries to …….data and processing.

Select correct option:

  • Distribute

Merge

Clone

Proceed

Question # 7 of 10 ( Start time: 06:23:24 PM ) Total Marks: 1

N-tier architecture stems from the struggle to find a ----------- between the fat-client architecture and the thin-client architecture.

Select correct option:

Concurrency

Distribution point

  • Middle ground

Similarity

Question # 8 of 10 ( Start time: 06:24:20 PM ) Total Marks: 1

Vertical partitioning divides the architecture application from a ……

making perspective.

  • Decision

Design

Conclusion

Move

Question # 9 of 10 ( Start time: 06:25:23 PM ) Total Marks: 1

Distributing the responsibilities to different subsystems so that we get a software system which is easy to maintain, is called ………the architecture.

Select correct option:

Subtracting

  • Partitioning

Cloning

Balancing

yey knsa quiz hay  M.Tariq Malik

CS504 Qiuz 4-5-2014

Attachments:

my current quize file

Attachments:

solved quiz

Attachments:

here is complete quiz 4 enjoy

Attachments:

CS504 Software Engineering - I Online Quiz No. 04 on 4 Feb 2014

Complex expressions:

Make the code easy to modify

Make the code difficult to modify          = Ans

Make the code easy to understand

Does not effect understandablity

Ref: Pg.164

if a major rework is required to translate a program written for one environment to another, it means code is not or less _________

Secure

Bug Free

plateform dependent

Portable    = Ans

Ref: Pg.179

rework is required to port a program written for one environment to another

Which one is correct?

double total = 0.5;    = Ans

double total = .5;

double total = .50;

all of the given

Ref: Pg.161

double total = 0.5; // NOT: double total = .5;

C++ header files should have the extension---- Source files can have the extension ----

.c  and .h

.cc and .h

.h and .cpp    = Ans

All of the given

Ref: Pg.155

C++ header files should have the extension .h. Source files can have the extension .c++(recommended), .C.cc or .cpp.

_________ was the first pure Object Oriented language in which observer pattern was used in implementing its Model View Controller pattern

Smalltalk

PASCAL

JAVA

C++

Ref: Pg.140    = Ans

Smalltalk being the first pure Object Oriented language in which observer…..

x = 0; // x is floating pt Which rewritten form of above line of code is more in line with the self-documentation philosophy than the code above.

x = false

x = NULL

x = 0.0;    = Ans

x = ‘\0’

Ref: Pg.169

flag = 0;                 // flag is boolean

str = 0;                    // str is string

name[i] = 0;          // name is char array

x = 0;                      // x is floating pt

i = 0;                       // i is integer

This is a legacy ……the self-documentation philosophy than the code above.

flag = false;

str = NULL;

name[i] = ‘\0’;

x = 0.0;

i = 0;

The size of __________ plays a significant role in making the program easy or difficult to understand.

function    = Ans

object

data type

none of the above

Ref: Pg.147 Same line

Names representing methods and functions should be----and written in mixed case starting with -----case.

Noun—lower

Verb----lower    = Ans

Noun ---upper

Noun----upper

Ref:Pg.150

Names representing methods and functions should be verbs and written in mixed case starting with lower case.

Names representing types must be nouns and written in mixed case starting with upper case.

Variable names must be in mixed case starting with lower case.

Names representing constants must be all uppercase using underscore to separate words.

Names representing template types in C++ should be a single uppercase letter.

Global variables in C++ should always be referred to by using the  :: operator

Private class variables should have _ suffix.

Abbreviations and acronyms should not be uppercase when used as name

Generic variables should have the same name as their type

Non-generic variables have a role. These variables can often be named by combining role and type:

All names should be written in English

Variables with a large scope should have long names, variables with a small scope can have short names.

The name of the object is implicit, and should be avoided in a method name

 

"is" prefix should be used for------ variables and methods.

General

Boolean    = Ans

Constant

None of the given

Ref: Pg.152

is prefix should be used for boolean variables and methods

The terms get/set must be used where an attribute is accessed directly.

The term compute can be used in methods where something is computed

The term find can be used in methods where something is looked up.

The term initialize can be used where an object or a concept is established

List suffix can be used on names representing a list of objects

n prefix should be used for variables representing a number of objects

No suffix should be used for variables representing an entity number

Iterator variables should be called ijk etc

Complement names must be used for complement entities

Abbreviations in names should be avoided

Negated boolean variable names must be avoided

Functions (methods returning an object) should be named after what they return and procedures (void methods) after what they do

 

 

 

 

 

 

When a small set of functions (which use each other) is so overwhelmingly the bottleneck, there are two alternatives:

use a better algorithm OR re-write the code    = Ans

debug the code OR place assertions in code

remove the functions OR add more functions

changed programming language OR compiler at least

Ref: Pg.177

When a small set (a couple of functions) of functions which use each other is so overwhelmingly the bottleneck, there are two alternatives:

1. use a better algorithm

2. rewrite the whole set

Which of the following is used for multi level commenting?

// Comment                 = Ans

/* Comment */

(Comment)

*/ Comment/*

Ref: Pg.162

Use // for all comments, including multi-line comments

to comment out entire sections of a file using /* */ for debugging purposes

Which of the following shows a commented statement in C++

# Ans = first + second

// Ans = first + second    = Ans

\\ Ans = first + second

/# Ans = first + second

Ref: Pg.162

C++ and Java, using // comments

________ is a tool that can help us in reducing the size of individual functions.

Inheritance

Modularity    = Ans

Association

Abstraction

Ref: Pg.170 same line

Be very careful when you use functions with side effects – functions that change the values of the ________

Objects

Classes

Structures

Variables                        = Ans

Ref: Pg.176 same line

http://en.wikipedia.org/wiki/Variable_(computer_science)    

Search string:           parameters of functions are also referred to as variables

Global variables in C++ should always be referred to by using the

:: operator    = Ans

: operator

Without an operator

None of the given

Ref: Pg.150 same line

Floating point constants should always be written with decimal point and at least

one decimal                  = Ans

two decimal

three decimal

none of the given

Ref: Pg.161 same line

 

 

Which indent size eliminates the chance of code lines splitting?

2                                                               = Ans

4

3

6

Ref: Pg. 163

2 chosen to reduce the chance of splitting code lines

Code should not be:

commented                              = Ans

Indented

Cryptic

Aligned

Ref: Pg.162 same line

Code should not be commented but rewritten.

A function should not be larger in any case and should not exceed ______ in length.

Half page

One page    = Ans

Two pages

Three Pages

Ref: Pg.147

a function should not be larger than 20 lines of code and in any case should not exceed one page in length

 

Question # 1 of 10 ( Start time: 06:15:15 PM ) 

STL Stnads for ------------------

  • Standard Template Library

Standard Type Link

Standard Tempo Line

None of the given

Question # 2 of 10 ( Start time: 06:16:10 PM ) Total Marks: 1

Three tier architecture contains ------------- layers

Select correct option:

Presentation

Application

Database

  • All of the above

Question # 3 of 10 ( Start time: 06:17:05 PM ) Total Marks: 1

Which of following is/are among ten things, which the basic template

of GOF design pattern includes.

Select correct option:

Problem

Context

Forces

  • All of the given

Question # 4 of 10 ( Start time: 06:18:40 PM ) Total Marks: 1

Vertical partitioning is also known as…..

Select correct option:

Balancing

Mutating

Parallelizing

  • Factoring

Question # 5 of 10 ( Start time: 06:20:06 PM ) Total Marks: 1

Patterns are devices that allow programs to share knowledge about

their -------------.

Select correct option:

Code

Design

Analysis

None of the given

Question # 6 of 10 (Start time: 06:22:07 PM) Total Marks: 1

Client server model tries to …….data and processing.

Select correct option:

  • Distribute

Merge

Clone

Proceed

Question # 7 of 10 ( Start time: 06:23:24 PM ) Total Marks: 1

N-tier architecture stems from the struggle to find a ----------- between the fat-client architecture and the thin-client architecture.

Select correct option:

Concurrency

Distribution point

  • Middle ground

Similarity

Question # 8 of 10 ( Start time: 06:24:20 PM ) Total Marks: 1

Vertical partitioning divides the architecture application from a ……

making perspective.

  • Decision

Design

Conclusion

Move

Question # 9 of 10 ( Start time: 06:25:23 PM ) Total Marks: 1

Distributing the responsibilities to different subsystems so that we get a software system which is easy to maintain, is called ………the architecture.

Select correct option:

Subtracting

  • Partitioning

Cloning

Balancing

Thanks

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service