





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
software engineering for University students
Typology: Exams
1 / 9
This page cannot be seen from the preview
Don't miss anything!






Instructions
1. [6 points] Answer briefly each of these questions about refactoring. - What is refactoring? - What role does refactoring play in the design of software? - What is the relationship between refactoring and testing?
tem. The current version is given at the end of the exam.
5. [6 points] Answer briefly each of these questions about the "Writing Maintainable Automated Acceptance Tests" article by Emery. - What relationship between maintenance and testing does Emery address? - Describe the difference between the acceptance test at the beginning of the paper and the acceptance test at the end. - What tools are needed to implement the sort of tests that Emery describes? 6. [4 points] Answer briefly these questions about testing as an attempt to demonstrate a match between the specification for a system and the code that implements the system. - Identify two clues a tester can take from the specification when writing tests. - Identify two clues a tester can take from the code when writing tests.
7. [6 points] Answer briefly these questions about agile methodology, as it relates to Fowler’s distinction between predictive versus adaptive approaches to software de- velopment processes. - Describe at least two ways in which agile methodologies are adaptive rather than predictive. - What risk does a development team incur when it chooses to be adaptive rather than predictive? - In what ways does extreme programming try to mitigate this risk? 8. [6 points] Based on your experience with your team project, answer briefly these questions about the software life cycle. - Which stage was most difficult? Why? What did your team do in response? - Which stage was most straightforward? Why?
11. [6 points] Identify each of the labeled components in this UML class diagram. A ___________________________ F ___________________________ B ___________________________ G ___________________________ C ___________________________ H ___________________________ D ___________________________ I ___________________________ E ___________________________ J ___________________________ .
import java.util.Enumeration; import java.util.Vector; public class Customer { private String name; private Vector rentals; public Customer( String name ) { this.name = name; this.rentals = new Vector(); } public void addRental( Rental arg ) { rentals.addElement( arg ); } public String getName() { return name; } public String statement() { double totalCharge = 0; int frequentRenterPoints = 0; String result = "Rental Record for " + getName() + "\n"; Enumeration entries = rentals.elements(); while ( entries.hasMoreElements() ) { Rental each = (Rental) entries.nextElement(); double rentalCharge = each.charge(); frequentRenterPoints += each.frequentRenterPoints(); // show figures for this rental result += "\t" + each.getMovie().getTitle() + "\t" + String.valueOf(rentalCharge) + "\n"; totalCharge += rentalCharge; } result += "Amount owed is " + String.valueOf(totalCharge) + "\n"; result += "You earned " + String.valueOf(frequentRenterPoints) + " frequent renter points"; return result; }