Final Exam - Questions for Solution - Software Engineering II | CS 428, Exams of Software Engineering

Material Type: Exam; Professor: Marinov; Class: Software Engineering II; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2008;

Typology: Exams

2010/2011

Uploaded on 06/14/2011

koofers-user-cxq
koofers-user-cxq 🇺🇸

5

(1)

10 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
University of Illinois at Urbana-Champaign
Department of Computer Science
Final Exam
CS 428 Software Engineering II
Spring 2008
May 7, 2008
TIME LIMIT = 3 hours
COVER PAGE + 15 PAGES
Upon receiving your exam, print your name and netid neatly in the space provided
below; print your netid in the upper right corner of every page.
Name:
Netid:
This is a closed book, closed notes examination. You may not use calculators or any other electronic
devices. Any sort of cheating on the examination will result in a zero grade.
We cannot give any clarifications about the exam questions during the test. If you are
unsure of the meaning of a specific question, write down your assumptions and proceed to answer
the question on that basis.
Do all the problems in this booklet. Do your work inside this booklet, using the back of pages
if needed. The problems are of varying degrees of difficulty so please pace yourself carefully, and
answer the questions in the order which best suits you. Answers to essay-type questions should be
as brief as possible. If the grader cannot understand your handwriting you may get 0 points.
There are 16 questions on this exam and the maximum grade on this exam is 130 + 1 (bonus)
points.
Page Points Score
1 15
2 10
3 7
4 10
5 7
6 8
7 8
Total: 65
Page Points Score
8 6
9 15
10 9
11 9
12 6
14 10
15 10
Total: 65
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Final Exam - Questions for Solution - Software Engineering II | CS 428 and more Exams Software Engineering in PDF only on Docsity!

University of Illinois at Urbana-Champaign

Department of Computer Science

Final Exam

CS 428 Software Engineering II Spring 2008 May 7, 2008 TIME LIMIT = 3 hours COVER PAGE + 15 PAGES

Upon receiving your exam, print your name and netid neatly in the space provided below; print your netid in the upper right corner of every page.

Name: Netid:

This is a closed book, closed notes examination. You may not use calculators or any other electronic devices. Any sort of cheating on the examination will result in a zero grade.

We cannot give any clarifications about the exam questions during the test. If you are unsure of the meaning of a specific question, write down your assumptions and proceed to answer the question on that basis.

Do all the problems in this booklet. Do your work inside this booklet, using the back of pages if needed. The problems are of varying degrees of difficulty so please pace yourself carefully, and answer the questions in the order which best suits you. Answers to essay-type questions should be as brief as possible. If the grader cannot understand your handwriting you may get 0 points.

There are 16 questions on this exam and the maximum grade on this exam is 130 + 1 (bonus) points.

Page Points Score 1 15 2 10 3 7 4 10 5 7 6 8 7 8 Total: 65

Page Points Score 8 6 9 15 10 9 11 9 12 6 14 10 15 10 Total: 65

CS 428 Final Exam netid:

  1. Short answers

1 (a)What is the most important factor in project success?

A. the development tools B. the skill of the programmer C. the programming languages used D. the development methodology

1 (b)The best programmers are how many times more productive than the worst? A. ' 2x B. ' 10x C. ' 30x D. ' 50x

1 (c)True or False: For every 25% increase in problem complexity, there is a 100% increase in complexity of the software solution.

1 (d)True or False: Performance and maintainability are functional requirements of a system.

1 (e)Fill in the blanks: A good design should strive for cohesion and coupling.

  1. Code Review

2 (a)In a code review, finding the defects is more important than solving the defects. Explain.

4 (b)Briefly describe the roles of the moderator and reviewer in a code review.

4 (c)How is a code review different from an inspection? How is a code review different from a walkthrough?

1 (b)What classic example does Wirth use as the basis for his discussion?

  1. Facts and Fallacies of Software Engineering

2 (a)Fred Brooks, author of The Mythical Man-Month, is famous for the quote “adding man- power to a late software project makes it later”. This quote is commonly known as Brooks’s Law. Explain the basis behind Brooks’s Law.

2 (b)However, Eric Raymond, author of The Cathedral and the Bazaar, claims that open source development is not strongly affected by Brooks’s Law. Justify Eric Raymond’s claim.

2 (c)Software developers usually embrace tools that will help them develop software better. According to Robert Glass, no matter how phenomenal the tool is, using a new tool or technique lowers programmer productivity and product quality at first. Explain Robert Glass’s claim.

  1. Open Source Software Engineering

4 (a)If open source software is supposed to be free, how would companies and developers make any money? Briefly explain two business models for open source software.

2 (b)Some open source projects behave more like the bazaar than others. Illustrate this fact by giving examples.

2 (c)Fred Brooks, author of The Mythical Man-Month is famous for saying “plan to throw one away; you will anyhow”. Give one advantage and one disadvantage of rewriting your software from scratch.

  1. Software Performance

2 (a)In the context of performance, what does throughput measure? What does response-time measure?

  1. User Interface Design

2 (a)What is Tog’s mile high menu bar? Why is it useful?

2 (b)What does Fitt’s Law say? Why is it useful?

4 (c)What does Joel mean by “users don’t read, can’t control the mouse, or remember”? What impact does this notion have on good UI design?

3 9. In CS 427 & CS 428 we have encountered at least three different examples of patterns: reverse engineering patterns, design patterns and user interface patterns. Briefly explain what a pattern is. Why is using patterns a good idea? How do you decide to use a certain pattern?

We discussed the following patterns from Designing Interfaces in class: Two-Panel Selector, One-Window Drilldown, Wizard, Extras on Demand, Intriguing Branches, Visual Framework, Center Stage, Titled Sections, Card Stack, Closable Panels, Movable Panels, Diagonal Balance, Responsive Disclosure, Responsive Enabling, Liquid Layout, Action Panel, Smart Menu Items, Progress Indicator, Multi-Level Undo and Command History. For the following two questions please answer using the patterns that we have listed.

  1. Which pattern would you use in the following situations:

1 (a)You want to create a strong corporate identity/branding among all the different applica- tions in your suite.

1 (b)You are designing a website that needs to display properly across web browsers with different window sizes.

1 (c)You are designing a user interface for a handheld device with a small screen and simple input controls.

1 (d)You have a sequence of actions that the user must perform in some order and you wish to guide the user through them.

1 (e)You have a time-consuming operation and you want to show the user how much of it has already been completed.

  1. Licenses and Intellectual Property

3 (a)Name three types of intellectual property that we discussed in class.

6 (b)Explain the characteristics of a good software license. Name three characteristics.

2 (c)Why are Creative Commons licenses not recommended for software?

2 (d)Explain the main difference between the MIT License and the GPL license.

  1. Web Services and Service Oriented Architecture (SOA)

2 (a)Briefly describe what a service oriented architecture is.

2 (b)According to Paul Graham in The Other Road Ahead, how do users benefit from a web service architecture? How do developers benefit from a web service architecture?

3 (c)In web services, content is king. What can a web developer do to make sure that the data presented is accurate and up-to-date?

4 (d)SOAP and REST are two popular styles of implementing SOA. Briefly contrast how the two different styles work.

6 15.Code Review for Tests

Listing 1: Test with test smells 1 public void t e s t A l l S o r t s ( ) { 2 // I n s e r t i o n s o r t 3 for ( int i = 1 ; i <= numberOfTestFiles ; i ++){ 4 int [ ] t e s t I n p u t = readFromFile ( ” i n s e r t i o n ”+i+”. i n ” ) ; 5 int [ ] t e s t O u t p u t = readFromFile ( ” i n s e r t i o n ”+i+”. out ” ) ; 6 7 i f (! e q ua l A r ra y ( testOutput , i n s e r t i o n S o r t ( t e s t I n p u t ) ) ) { 8 System. out. p r i n t l n ( ” I n s e r t i o n s o r t f a i l e d a t f i l e : ”+i ) ; 9 break ; 10 } 11 } 12 13 // Merge s o r t 14 for ( int i = 1 ; i <= numberOfTestFiles ; i ++){ 15 int [ ] t e s t I n p u t = readFromFile ( ” merge ”+i+”. i n ” ) ; 16 int [ ] t e s t O u t p u t = readFromFile ( ” merge ”+i+”. out ” ) ; 17 18 i f (! e q ua l A r ra y ( testOutput , mergeSort ( t e s t I n p u t ) ) ) { 19 System. out. p r i n t l n ( ”Merge s o r t f a i l e d a t f i l e : ”+i ) ; 20 break ; 21 } 22 } 23 24 // Quick s o r t 25... 26 }

Describe three test smells that you detect in the Listing 1 and indicate where they are located. It is acceptable to circle and use arrows to point to the offending code segments.

  1. Snakes And Ladders

You are asked to implement a simplified model for the classic children’s game Snakes and Ladders (or Chutes and Ladders). Snakes and Ladders is a board game. It is a turn-based game played between 2 or more players on a board with incrementally numbered squares (e.g. #1, #2, #3,... ). Assume that the board can be initialized to have as many squares as desired. All players start from the first square i.e. square #1. The game ends when one of the players reaches the last square. Players move forward to different squares by throwing a die and moving the amount shown on the die. In this game, a die can randomly display a value between 1 to 6. So if a player is at square #1 and the die shows 5, then the player moves forward to square (1 + 5) = #6. To make things interesting, there are three types of squares: normal squares, snake squares and ladder squares. If a player lands on a snake square, then the player automatically moves backward to a square in the game. If a player lands on a ladder square, then the player automatically moves forward to a square in the game. Nothing happens if a player lands on a normal square. Here are two scenarios that our model handles:

  1. Initialize the board

Figure 3: The initial board setup described in Scenario 1

We want to start a new game. For this game, we would like to add 10 squares. There will also be two players in this game: Pat and Sam. We want to add a ladder square at position #3 that will move a player that lands on it to position #7. We want to add a snake square at position #4 that will move a player that lands on it back to position #2.

  1. Playing the game We are playing the game that we setup from Scenario 1. Pat plays first and throws a 2 on the die and moves on the board. Sam plays second, throws a 3 on the die and moves on the board.

10 (b)Show the sequence diagram for Scenario 2. You can assume that the board has been setup according to Scenario 1 for you. Hint: Remember to show all the methods that are called in this scenario leading to the final positions of the players.

Page 15 of 15 End of exam.