RU beehive logo ITEC dept promo banner
ITEC 120
2019fall
asbrennem
ibarland

eBay skeleton
(helper code)

/** A class with functions for computing various eBay fees.
 * See http://www.radford.edu/~itec120/2019fall-ibarland/Labs/lab04a-ebay.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.00 or 0.35 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!
    /* WE WILL ASSUME WE MAKE MORE THAN 50 LISTINGS PER MONTH.
     * (For challenge: add an extra parameter to `totalEbayFee`, to compute this correctly.)
     */
  

    return ___________________________;
    }


  static void testComputeFVFee() {
    // If you like, you can use `Object120.assertEquals`, to make this easier:

    // 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! 
    
    
  }
  
  
  static void testTotalEbayFee() {



    // 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/implementation 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.)
logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.