RU beehive logo ITEC dept promo banner
ITEC 120
2012fall
dbraffitt
ibarland

homeinfolectslabsexamshws
tutor/PIsbreeze (snow day)
Object120 + its docsjava.lang docsjava.util docs

lab05a-skeleton
eBay skeleton
(helper code)

/** 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
  }
The purple parts are comments that I would not actually include in my final program. (They are there to guide you, but another java programmer understands those points.)

homeinfolectslabsexamshws
tutor/PIsbreeze (snow day)
Object120 + its docsjava.lang docsjava.util docs


©2012, Ian Barland, Radford University
Last modified 2012.Sep.25 (Tue)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Powered by PLT Scheme