text: // Write a function "tipAmount" that is given the bill amount and the level of
  // service (one of good, fair and poor) and returns the dollar amount for the tip.
  //
  // Based on:
  // good --> 20%
  // fair --> 15%
  // poor --> 10%
  //
  // Examples:
  // tipAmount(100, 'good') --> 20
  // tipAmount(40, 'fair') --> 6
  
  function tipAmount(aBill, serviceLevel) {
    switch (serviceLevel) {
      case "good":
        return (aBill * .2)
        break;
        case "fair":
          return (aBill * .15)
        break;
        case "poor":
          return (aBill * .10)
        break;
    
      default:
        break;
    }
  }
  
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Write a function "totalAmount" that takes the same arguments as "tipAmount"
  // except it returns the total as the tip amount plus the bill amount.
  // Hint: this function may use "tipAmount" internally
  //
  // Examples:
  // totalAmount(100, 'good') --> 120
  // totalAmount(40, 'fair') --> 46
  
  function totalAmount(aBill, serviceLevel) {
    let currTip = tipAmount(aBill,serviceLevel);
    let currTotal =  aBill + currTip;
    return currTotal
  }
  
  
  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  // Write a function "splitAmount" that takes a bill amount, the level of service,
  // and the number of people to split the bill between. It should return the final
  // amount for each person.
  //
  // Examples:
  // splitAmount(100, 'good', 5) --> 24
  // splitAmount(40, 'fair', 2) --> 23
  
  function splitAmount(aBill, serviceLevel, numOfDiners) { 
    let preTotal = totalAmount(aBill,serviceLevel);
    let perPersonCost = preTotal / numOfDiners;
    return perPersonCost
  }