Page 1 Pittsburgh, PA 15213-3890 Final Review CS1530 Software Engineering.

Post on 17-Jan-2016

224 views 0 download

Transcript of Page 1 Pittsburgh, PA 15213-3890 Final Review CS1530 Software Engineering.

page 1

Pittsburgh, PA 15213-3890

Final Review

CS1530 Software Engineering

© 2002 by Carnegie Mellon University page 2

Question 1

Software engineering is not concerned with:a) cost-effective software developmentb) all aspects of software productionc) all aspects of computer-based systems development

including hardware, software and process engineering. d) practicalities of developing and delivering useful

softwaree) none of the above

© 2002 by Carnegie Mellon University page 3

Question 1

Software engineering is not concerned with:a) cost-effective software developmentb) all aspects of software productionc) all aspects of computer-based systems development

including hardware, software and process engineering. d) practicalities of developing and delivering useful

softwaree) none of the above

© 2002 by Carnegie Mellon University page 4

Question 2

Which of the following is not an essential product attribute?a) supportb) maintainabilityc) dependabilityd) efficiencye) usability

© 2002 by Carnegie Mellon University page 5

Question 2

Which of the following is not an essential product attribute?a) supportb) maintainabilityc) dependabilityd) efficiencye) usability

© 2002 by Carnegie Mellon University page 6

Question 3

Which of the following is not a process perspective?a) Workflow b) Waterfallc) Data-flowd) Role/actione) They all are

© 2002 by Carnegie Mellon University page 7

Question 3

Which of the following is not a process perspective?a) Workflow b) Waterfallc) Data-flowd) Role/actione) They all are

© 2002 by Carnegie Mellon University page 8

Question 4

Which of the following is not a benefit of risk/misfit evaluation?

a) exposes pros and cons of “jumping on the bandwagon”b) requires justification of use of features in terms of the

risk of not using themc) determines how best to integrate componentsd) exposes design decisions that are buried as

implementation decisionse) they all are

© 2002 by Carnegie Mellon University page 9

Question 4

Which of the following is not a benefit of risk/misfit evaluation?

a) exposes pros and cons of “jumping on the bandwagon”b) requires justification of use of features in terms of the

risk of not using themc) determines how best to integrate componentsd) exposes design decisions that are buried as

implementation decisionse) they all are

© 2002 by Carnegie Mellon University page 10

Question 5

JavaBeans are a) Stateless enterprise session beansb) EJBs that can interface with one or more Java clientsc) Java classes that can be reused and composed

together into applications. d) Entity beanse) Message beans

© 2002 by Carnegie Mellon University page 11

Question 5

JavaBeans are a) Stateless enterprise session beansb) EJBs that can interface with one or more Java clientsc) Java classes that can be reused and composed

together into applications. d) Entity beanse) Message beans

© 2002 by Carnegie Mellon University page 12

Question 6

5.   Which of the following is not a valid reason for using Enterprise JavaBeans?

a) The application must be scalable.b) The application must have high performancec) Transactions are required to ensure data integrity. d) The application will have a variety of clientse) They are all valid reasons

© 2002 by Carnegie Mellon University page 13

Question 6

5.   Which of the following is not a valid reason for using Enterprise JavaBeans?

a) The application must be scalable.b) The application must have high performancec) Transactions are required to ensure data integrity. d) The application will have a variety of clientse) They are all valid reasons

© 2002 by Carnegie Mellon University page 14

Question 7

The cost of developing a reusable component requires that the component be reused at least how many times to cover the additional cost?a) once b) twice c) 2.5x d) 10x e) 12.5x

© 2002 by Carnegie Mellon University page 15

Question 7

The cost of developing a reusable component requires that the component be reused at least how many times to cover the additional cost?a) once b) twice c) 2.5x d) 10x e) 12.5x

© 2002 by Carnegie Mellon University page 16

Question 8

Which of the following is not a valid principle for the use of color in a user interface?

a) Don't use too many colorsb) Use colors to identify errors and warningsc) Allow users to control color codingd) Design for monochrome then add colore) Use color coding consistently

© 2002 by Carnegie Mellon University page 17

Question 8

Which of the following is not a valid principle for the use of color in a user interface?

a) Don't use too many colorsb) Use colors to identify errors and warningsc) Allow users to control color codingd) Design for monochrome then add colore) Use color coding consistently

© 2002 by Carnegie Mellon University page 18

Question 9

High-quality, high business value legacy systems should be:

a) scrapped b) re-engineered or replaced if a suitable system is

availablec) Replaced with COTS, scrapped completely or

maintainedd) Continue in operation using normal system

maintenancee) None of the above

© 2002 by Carnegie Mellon University page 19

Question 9

High-quality, high business value legacy systems should be:

a) scrapped b) re-engineered or replaced if a suitable system is

availablec) Replaced with COTS, scrapped completely or

maintainedd) Continue in operation using normal system

maintenancee) None of the above

© 2002 by Carnegie Mellon University page 20

Question 10

Database schemas can be best modeled using:a) Data-flow diagramsb) Collaboration diagramsc) Entity-relation diagramsd) Deployment diagramse) None of the above 

© 2002 by Carnegie Mellon University page 21

Question 10

Database schemas can be best modeled using:a) Data-flow diagramsb) Collaboration diagramsc) Entity-relation diagramsd) Deployment diagramse) None of the above 

© 2002 by Carnegie Mellon University page 22

Question 11

The following UML diagram is a:

© 2002 by Carnegie Mellon University page 23

Question 11

The following UML diagram is a: sequence diagram

© 2002 by Carnegie Mellon University page 24

Question 12

A programmatic style of persistence logic implemented directly inside the enterprise bean class is called:

© 2002 by Carnegie Mellon University page 25

Question 12

A programmatic style of persistence logic implemented directly inside the enterprise bean class is called: bean managed persistence

© 2002 by Carnegie Mellon University page 26

Question 13

Top-down subroutine control model where control starts at the top of a subroutine hierarchy and moves downwards is called:

© 2002 by Carnegie Mellon University page 27

Question 13

Top-down subroutine control model where control starts at the top of a subroutine hierarchy and moves downwards is called: call-return model

© 2002 by Carnegie Mellon University page 28

Question 14

Context models are used to illustrate system:

© 2002 by Carnegie Mellon University page 29

Question 14

Context models are used to illustrate system: boundaries.

© 2002 by Carnegie Mellon University page 30

Question 15

A text-based document that contains static template data, and elements that are used to create dynamic content is a:

© 2002 by Carnegie Mellon University page 31

Question 15

A text-based document that contains static template data, and elements that are used to create dynamic content is a: Java Server Page

© 2002 by Carnegie Mellon University page 32

Question 16

Enhancements to an existing system are normally requested using a:

© 2002 by Carnegie Mellon University page 33

Question 16

Enhancements to an existing system are normally requested using a: change request form.

© 2002 by Carnegie Mellon University page 34

Question 17

The process that checks that we are building the right product is called:

© 2002 by Carnegie Mellon University page 35

Question 17

The process that checks that we are building the right product is called: validation

© 2002 by Carnegie Mellon University page 36

Question 18

J2EE applications are made up of components that can be deployed into different:

© 2002 by Carnegie Mellon University page 37

Question 18

J2EE applications are made up of components that can be deployed into different: containers

© 2002 by Carnegie Mellon University page 38

Question 19

Security roles are defined in an Enterprise JavaBeans:

© 2002 by Carnegie Mellon University page 39

Question 19

Security roles are defined in an Enterprise JavaBeans: deployment descriptor

© 2002 by Carnegie Mellon University page 40

Question 20

The systematic transformation of an existing system into a new form to realize quality improvements in operation, system capability, functionality, performance, or evolvability at a lower cost, schedule, or risk to the customer is called:

© 2002 by Carnegie Mellon University page 41

Question 20

The systematic transformation of an existing system into a new form to realize quality improvements in operation, system capability, functionality, performance, or evolvability at a lower cost, schedule, or risk to the customer is called: reengineering

© 2002 by Carnegie Mellon University page 42

Question 21

Rank the three ensembles using the following data

© 2002 by Carnegie Mellon University page 43

Feature $ Value for Risk

Max Risk

Residual Risk

Cost $/ RR

$ Per Risk

(r, c)

F1 $35,000 56 R1: 22R2: 17R3: 12R4: 56

$10,00023,000

4,0000

     

F2 $40,000 35 R1: 23R2: 12R3: 6R4: 35

3,00012,00018,000

0

     

F3 $90,000 87 R1: 34R2: 12R3: 43R4: 87

52,00078,00056,000

0

     

© 2002 by Carnegie Mellon University page 44

Feature $ Value for Risk

Max Risk

Residual Risk

Cost $/ RR

$ Per Risk

(r, c)

F1 $35,000 47 R1: 32R2: 24R3: 15R4: 47

$10,00023,000

4,0000

     

F2 $40,000 64 R1: 31R2: 42R3: 6R4: 64

3,00012,00018,000

0

     

F3 $90,000 75 R1: 32R2: 31R3: 15R4: 75

52,00078,00056,000

0

     

© 2002 by Carnegie Mellon University page 45

Feature $ Value for Risk

Max Risk

Residual Risk

Cost $/ RR

$ Per Risk

(r, c)

F1 $35,000 87 R1: 32R2: 42R3: 80R4: 87

$10,00023,000

4,0000

     

F2 $40,000 24 R1: 23R2: 5R3: 6R4: 24

3,00012,00018,000

0

     

F3 $90,000 34 R1: 17R2: 12R3: 21R4: 34

52,00078,00056,000

0

     

© 2002 by Carnegie Mellon University page 46

Rankings

1. Ensemble 2. Ensemble3. Ensemble

© 2002 by Carnegie Mellon University page 47

Question 22

Define input sequences based on the following input partitions to test the specified procedure. Show the input sequence, key, and output for each partition (5 points) Specification:procedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : in out BOOLEAN; L: in out ELEM_INDEX) ;Pre-condition

-- the array has at least one elementT’FIRST <= T’LAST

Post-condition-- the element is found and is referenced by L( Found and T (L) = Key)

or -- the element is not in the array( not Found and

not (exists i, T’FIRST >= i <= T’LAST, T (i) = Key ))

© 2002 by Carnegie Mellon University page 48

Input Sequences

Array Element

Single valueIn sequence

Not in sequence

Multiple valuesFirst element in sequence

Last element in sequence

Middle of sequence

Not in sequence

© 2002 by Carnegie Mellon University page 49

Question 22 Answer

Input sequence (T) Key (Key) Output (Found, L)

17

17

17, 29, 21, 23

41, 18, 9, 31, 30 16, 45

17, 18, 21, 23, 29, 41, 38

21, 23, 29, 33, 38

17

0

17

45

23

25

True, 1

False, ??

True, 1

True, 7

True, 4

False, ??

© 2002 by Carnegie Mellon University page 50

Question 23

Describe the differences between measures, preferences, criteria and preference structure in multi-criteria selection.

© 2002 by Carnegie Mellon University page 51

Question 23

Describe the differences between measures, preferences, criteria and preference structure in multi-criteria selection.

Measures are numbers objectively assigned to an attribute. Preferences are subjectively assigned to measured attributes. An attribute that has been assigned a preference is a criterion. The set of criteria defines the preference structure for the evaluation.

© 2002 by Carnegie Mellon University page 52

Question 24

23.  Write out the exact HTML generated by the JSP page: <% message.setString("TitleBookDescription", "Book Title"); message.setString("By", "By"); messages.getString("Price", "Cost";) messages.getString("Critics", "Critics"); book.setTitle("Building Systems from Commercial Components"); book.setFirstName("Kurt"); book.setSurname("Wallnau"); book.setPrice("54.95"); book.setYear("2001"); book.getDescription(“CBS development");%>

© 2002 by Carnegie Mellon University page 53

Question 24<html><head><title> <%=messages.getString("TitleBookDescription")%></title></head><br>&nbsp;<h2><%=book.getTitle()%></h2>&nbsp;<%=messages.getString("By")%> <em><%=book.getFirstName()%> <%=book.getSurname()%></em>&nbsp;&nbsp;(<%=book.getYear()%>)<br> &nbsp; <br> <h4><%=messages.getString("Critics")%></h4><blockquote><%=book.getDescription()%></blockquote><jsp:setProperty name="currency" property="amount" value="<%=book.getPrice()%>"/><h4><%=messages.getString("Price")%></h4>