Due: Tuesday, May 25 in Distribution Center
Name: | YOUR NAME |
---|---|
Student ID: | YOUR ID NUMBER |
Effort estimation is the practice of making accurate estimates of how long it will take to complete a piece of work. Software developers are notoriously bad at this. You will practice by estimating how long it takes you to complete a task.
Question | Estimate | Actual |
---|---|---|
2 | YOUR ESTIMATE | YOUR ACTUAL |
3 | YOUR ESTIMATE | YOUR ACTUAL |
4 | YOUR ESTIMATE | YOUR ACTUAL |
5 | YOUR ESTIMATE | YOUR ACTUAL |
Total | ESTIMATED TOTAL | ACTUAL TOTAL |
Calculate the error percentage: ((YOUR ACTUAL) - (YOUR ESTIMATE)) / (YOUR ESTIMATE)
TYPE YOUR ERROR PERCENTAGE HERE
A. Download and unzip this simple program. Compile and run it using the Eclipse IDE. Eclipse is available in the ICS labs, or you can download it from eclipse.org. Follow these detailed instructions on how to do it. Run it several times untill you get a result other than "everyone busted". Show the output of the program below.
COPY THE PROGRAM OUTPUT FROM THE CONSOLE PANE AND PASTE IT HERE.
B. Place a breakpoint on the call to dealTo() in BlackJack4.java. Run the program again and step through until round = 3. Print out a screenshot of the Eclipse debug perspective with the source code, Console showing 3 lines of output, and the Variables pane showing "round = 3".
PRINT OUT YOUR SCREENSHOT AND STAPLE IT TO THESE PAGES.
C. Refactor the code to make the following changes:
PRINT OUT THE REVISED SOURCE CODE AND STAPLE IT TO THESE PAGES.
A. Use "Window" menu, "Show view", "Ant" to open the "Ant" view. In the Ant view, press the first button (labeled "+++") and add "build.xml" to your Eclipse project. Then expand the tree widget in the Ant view and double click on "run" to compile and run the program. Show all Ant output below (it does not matter if everyone busts).
COPY THE ANT OUTPUT FROM THE CONSOLE PANE AND PASTE IT HERE.
B. Run the "prepare-docs" target. Show all Ant output below.
COPY THE ANT OUTPUT FROM THE CONSOLE PANE AND PASTE IT HERE.
A. Uncomment the source code lines with assert statements in Card.java and save the file. Note: Eclipse will mark each "assert" an error, until you use "Project", "Properties", "Java Compiler", "Compliance and classfiles" to set the "Compiler compliance level" to "1.4". Compile and run the program again using the Ant "run" target. An assertions will fail. Show the error message below.
COPY THE ERROR MESSAGE FROM THE CONSOLE PANE AND PASTE IT HERE.
B. Change both assert statements in Card.java to allow all possible legal values. You will have to understand the program to do this.
PRINT OUT THE REVISED Card.java AND STAPLE IT TO THESE PAGES.
C. This program is missing some key checks on its input. Specifically, if there are 13 players, the deck will run out of cards and raise an exception. Describe in English how you would prevent this error.
TYPE ONE SHORT PARAGRAPH HERE.
A. Double-click on the "checkstyle" target in the "Ant" pane. This will run the checkstyle source code analysis tool on your code. It will take about 10 seconds to finish. Afterwards, click on "bj4" in the explorer view and use the "Refresh" command on its popup menu. You will see a new file named "checkstyle_report.txt". Show the output below.
COPY CONTENTS OF checkstyle_report.txt AND PASTE IT HERE.
B. View the file checkstyle_report.txt and edit the Java source to correct at least five problems other than missing javadocs. The "features" section on the Checkstyle web site has links to explanations of Checkstyle messages. Include all source code and copy the messages from the original checkstyle_report.txt that you have resolved.
PRINT OUT THE REVISED SOURCE CODE AND STAPLE IT TO THESE PAGES.
COPY AT LEAST 5 Checkstyle MESSAGES FROM PART 5A THAT YOU HAVE RESOLVED AND PASTE THEM HERE.
sample use case templateexample test plan templateProject plan template