RU beehive logo ITEC Department logo
ITEC 120
2007spring
ibarland,
jpittges

homeinfoexamslectureslabshws
RecipeLawsliessyntaxjava.lang docsjava.util docs

lab03a-skeleton
lab03a: ebay solution skeleton

class EbayExpert {


  /**  This function, computeEbayFee,  ... does what, briefly?
   *  @param ________  _______________
   *  @param ________  _______________
   *  @return _____________________.
   *   Some test cases:
   *      computeEbayFee( ____, ____ ) = _____
   *      computeEbayFee( ____, ____ ) = _____
   *      computeEbayFee( ____, ____ ) = _____
   *      computeEbayFee( ____, ____ ) = _____
   */
  ______ computeEbayFee( ______ salePrice, _______ usedGallery ) {

    /* We'll put some NAMED_CONSTANTS here later, for part 3 of the lab. */



    /* Compute a sub-result of our overall answer, using a local variable: */
    double feeForGallery;       // Whether we charge 0 or 0.35 depends on
    if ( ______ ) {             // whether the gallery-option was actually used.
      feeForGallery = ______;
      }
    else
      feeForGallery = ______;
      }
  
  
    /* Compute a sub-result of our overall answer, using a local variable: */
    double finalValueFee;
    /* What will we initialize this local variable to?
     * An 'if' statment seems plausible...1
     */


  



    /* Compute a sub-result of our overall answer, using a local variable: */
    double flatListingFee = ______;   // We can declare and initialize all on one line!
    /* Hmm, should this be a NAMED_CONSTANT, instead? */
  
  
    return ____________________;
    }

  }
The purple parts are comments that I wouldn't actually include in my final program. (They are there to guide you, but another java programmer understands those points.)

1 Math-whizzes might find a formula which doesn't involve 'if', but Math.max and Math.min instead!      

homeinfoexamslectureslabshws
RecipeLawsliessyntaxjava.lang docsjava.util docs


©2007, Ian Barland, Radford University
Last modified 2007.Aug.27 (Mon)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme