Extra Credit Problems
Here are a number of problems which can be worked for extra credit. Each of these problems, if done correctly, will add one point each to your total grade for the semester. In other words, if your grade for the semester is 88 and you correctly work three extra credit problems, you will have a final grade of 91. This can mean the difference between a B+ and an A-, but only if you are willing to do the work!
To present more of a challenge, these problems are *NOT* in your current textbook. Rather, they are from the texts that were used in previous years. In addition, some of them are not in *ANY* textbook, but rather are made up for you from scratch.
The extra credit problems are:
Problem 3.10, Rajlich page 46
Write a class that supports course grading; it contains an array of 30 students such that each student is identified by an integer and has a course grade. There is also amethod that can change the student grade and a method that computes the grade point average for the entire class of 30 students.
Problem 4.2, Rajlich page 63
Draw a class diagram of a library lending books using the following classes: Librarian, Lending Session, Overdue Fine, Book Inventory, Book, Library, Checkout System, and Library Card. Download and install a UML tool such as StarUML, ArgoUML, or Poseidon and use the tool to draw the class diagram.
Problem 4.3, Rajlich page 63
Draw an activity diagram of pumping gas and paying by credit card at the pump. Include at least five activities, such as "Select fuel grade" and at least two decisions, such as "Get receipt?" Download and install a UML tool such as StarUML, ArgoUML, or Poseidon and use the tool to draw the diagram. If you did this for the previous problem, you may use the same tool.
Problem 10.6, Schach page 166
For the following program design a minimal test suite:
public static void main(String args[]) {
int i,j;
int k = 0;
i = Integer.parseInt(args[0]);
j = Integer.parseInt(args[1]);
if( i > 30 ) {
if( i <= 60 && j <= 150 )
k = 1;
else if( i <= 90 && j <= 150 )
k = 2;
else
k = 3;
}
if( i == j && i <= 30 )
k=4;
System.out.println( k );
}
Problem 10.8, Schach page 167
In test driven development, a test is written and then the code to pass it. Given the following test, write a method that passes the test.
public class TestGrade {
Grade testGrade;
public void testGetFinalGrade() {
assert( testGrade.getFinalGrade(70) == "Pass" );
assert( testGrade.getFinalGrade(69) == "Fail" );
};
Problem 10.8, Schach page 167
Expand the test in exercise 10.8 to include grades A to F using the following grade scale:
| Letter Grade | Minimum Percentage |
|---|---|
| A | 90 |
| B | 80 |
| C | 70 |
| D | 60 |
| F | Less than 60 |
Problem 11.2, Schach page 388
Instructor note: Although this problem is actually not from your text book for this semester, you should still be able to answer it, based on your knowledge of software engineering that you gained during the course.
Consider the following recipe for grilled pockwester.
Ingredients:
The night before, take one lemon, squeeze it, strain the juice, and freeze it. Take one large onion and three shallots, dice them, and grill them in a skillet. when clouds of black smoke start to come off, add 2 cups of fresh orange juice. Stir vigorously. Slice the lemon into paper-thin slices and add to the mixture. In the meantime, coat the mushrooms in flow, dip them in milk, and then shake them in a paper bag with the bread crumbs. In a saucepan, heat ½ cup of Pouilly Fuissé. when it reaches 170°, add the sugar and continue to heat. When the sugar has caramelized, add the mushrooms. Blend the mixture for 10 minutes or until all the lumps have been removed. Add the eggs. Now take the pockwester, and kill it by sprinkling it with frobs. Skin the pockwester, break it into bite-sized chunks, and add it to the mixture. Bring to a boil and simmer, uncovered. The eggs previously should have been vigorously stirred with a wire whisk for 5 minutes. When the pockwester is soft to the touch, place it on a serving platter, sprinkle with Parmesan cheese, and broil for not more than 4 minutes.
Determine the ambiguities, omissions, and contradictions in the preceding specification. Don't
forget to check the ingredients list for such things as well. You may either write your findings in
a descriptive paragraph, or you may make a list. (For the record, a pockwester is an imaginary sort
of fish and frobs is slang for generic hors d'oeuvres.)
Flowchart Problem
Download and install the Raptor Flowchart Runner. Experiment with it until you can work it, at least in a rudimentary fashion. Then, implement the following program using the flowchart runner. When it works, take a screen shot of your flowchart and embed the graphic in a document for submission. Also submit the resulting code run from the tool. Here is the program (should look familiar from CMSI 185 or CMSI 186):
function fizzbuzzdisplay() {
for( var j = 1; j < 11; j++ ) {
for( var i = j; i < 101; (i += 10) ) {
if( !(i % 3) ) {
output += "FIZZ\n";
if( !(i % 5) ) {
output += "BUZZ\n";
}
} else if( !(i % 5) ) {
output += "BUZZ\n";
} else {
output += i;
}
}
}
alert( output );
}
Software Configuration Management Plan
Write a Configuration Management Plan for your project. Use the information found on the course docs page for the Software Configuration Management Plan. Perform an Internet search to find a CMMI example of the document, or the version which is made available by the SEI, and use it as a model. Make the document as complete as possible. Cite your source if you use something from the Internet as a model.
Software Test Plan or Test Procedure
Write a Test Plan or Test Procedure for your project. Use the information found on the course docs page for the Software Configuration Management Plan. Perform an Internet search to find a CMMI example of the document, or the version which is made available by the SEI, and use it as a model. Make the document as complete as possible. Cite your source if you use something from the Internet as a model.
Due date: 2011-05-08