|
home—info—lects—labs—exams—hws
tutor/PIs—breeze (snow day)
Object120 + its docs—java.lang docs—java.util docs
/** A class with functions for computing various eBay fees. * See http://www.radford.edu/~itec120/2012fall-ibarland/Labs/lab05a.html * * @author __________________ * @author __________________ */ class EbayExpert { /** This function, totalEbayFee, ... does what, briefly? * @param __________ _______________ * @param __________ _______________ * @return __________________________________________. */ static ______ totalEbayFee( ______ salePrice, _______ usedGallery ) { /* Compute a sub-result of our overall answer, using a local variable: */ double actualGalleryFee; // Whether we charge 0 or 1.00 depends on //initialize actualGalleryFee // whether the gallery-option was actually used. /* Compute a sub-result of our overall answer, using a local variable: */ double finalValueFee; /* What will we initialize this local variable to? * It's complicated enough that we'll have a separate function!, * and just call that to figure out what to initialize finalValueFee to. */ /* Compute a sub-result of our overall answer, using a local variable: */ double insertionFee = ______; // We can declare and initialize all on one line! return ____________________; } static void testEbayExpert() { // If you like, you can use your `testEqualDoubles`, to make this easier: System.out.println( "Just the final value fee for a $5 item with no gallery picture:" ); System.out.println( "Actual: " + computeFVFee( ____ )); System.out.println( "Expect: " + ____ ); // several more test cases! System.out.println( "Total fee for a $5 item with no gallery picture:" ); System.out.println( "Actual: " + totalEbayFee( ____, ____ ) ); System.out.println( "Expect: " + ____ ) ); // more test cases (presumably parallel to the ones for computeFVFee) } // Your code for computeFVFee here } |
home—info—lects—labs—exams—hws
tutor/PIs—breeze (snow day)
Object120 + its docs—java.lang docs—java.util docs
©2012, Ian Barland, Radford University Last modified 2012.Sep.25 (Tue) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |