C++ Makeshift Uber Application : <p>As the title says, this is supposed to be a makeshift Uber-esque application that asks the user for their name, where they're going, how far away it is, and calculates the cost of the trip. I've been stuck with the last two functions for the last hour and I'm not quite sure what my professor is asking me to do. That, and I'm also not sure if I'm on the right track at all. For the last two functions, "double calc_fare" and "void share_fare_info", these are my instructions:</p>

<blockquote>
  <p>In main(), ask the user to enter their full name. Use code as shown below to accept a string with spaces. getline() is a function available to you from iostream. You do not need–should not try–to create it.
  In main(), ask the user to enter their destination. Destination will be entered as the full street name. Since street address will include spaces, use code similar to what was given in step 1</p>
  
  <p>In main(), ask the user if their destination is within city limits. (In a real scenario, the GPS mapping software would be able to determine this based on the destination address. Since we don’t have that ability, we will simply ask the user).</p>
  
  <p>In main(), ask the user to enter the distance of the fare. (In a real scenario, the GPS mapping software would be able to determine this based on the destination address. Since we don’t have that ability, we will simply ask the user).</p>
  
  <p>Create a function calc_fare(double distance). This function will calculate the fare as follows: A fixed amount of $10 for distances up to 2 miles. $2.50 per mile for distances over 2 miles and up to 5 miles plus a fixed amount of $5.00. Anything over 5 miles will be charged at $3.50 per mile. Return the amount of the fare based on the above rate table.</p>
  
  <p>Create a function calc_fare(double distance, double surcharge). This function calls the calc_fare() function in step 5 and returns a value adding the surcharge to the resulting fare.</p>
  
  <p>Create a function calc_fare(double distance, bool local). When local is true, it means that the fare is within city limits. When local is false, it means that the fare goes outside city limits, in which case, an additional $50 surcharge will be added to the fare. Call calc_fare() from Step 5 and calc_fare() from Step 6 within this function, depending on the value of local. Note that the functions given in steps 5-7 are overloaded versions of the calc_fare() function.</p>
  
  <p>Essentially, what we are doing in this exercise is creating the calc_fare() functions and calling them with driver calls. Drivers-no pun intended since this is a driving simulation-are basically the execution of functions manually to test that they are working, or calculating correctly. The input values of the calc_fare() functions are being entered manually by the user to test them. In a real use case of the functions, they will be called with distances determined by GPS mapping library calls.</p>
  
  <p>Create a function called show_fare_info(string name, string destination, double fare, bool local = true). This function will display the information to the user based on the previous user input. This function shows information; what return type is best to use for this function? Call this function from main() to display the final output. This function gives a different message based on the local variable.</p>
</blockquote>

<p>Sorry for the wall of text, but the instructions are more clear than I can be.</p>

<p><strong>My Code so far:</strong> </p>

<pre><code> double calc_fare(double distance);
 double calc_fare(double distance, double surcharge);
 double calc_fare(double distance, bool local);
 void show_fare_info(string fullname, string destination, double fare, bool local = true);

int main()
{

  string fullname, destination;
  double distance;
  char local;

  cout &lt;&lt; "Please enter your full name: ";
  getline(cin, fullname);
  cout &lt;&lt; "Please enter your desired destination: ";
  getline(cin, destination);
  cout &lt;&lt; "How far away is this destination from you? ";
  getline(cin, distance);
  cout &lt;&lt; "Is your location within city limits (y/n)? :";
  cin &gt;&gt; local;

 if(local == 'y' || local == 'Y')
 {
     fare = calc_fare(distance, true);
     show_fare_info(fullname, destination, fare);
 }

 else if(local == 'n' || local == 'N')
 {
     fare = calc_fare(distance, false);
     show_fare_info(fullname, destination, fare, false);
  }


      return 0;
  }

  double calc_fare(double distance)
  {
  int fare;

  if (distance &lt;= 2)
  {
      fare = 10;
  }
  else if (distance &lt;= 5 &amp;&amp; distance &gt;= 2)
  {
      fare = (distance * 2.50) + 10;
  }
  else if (distance &gt; 5)
  {
      fare = (distance * 3.50) + 10;
  }

      return fare;
  }

  double calc_fare(double distance, double surcharge)
  {
  surcharge = 50;

  if (distance == false)
  {
      fare = fare + surcharge;
  }

      return fare;
  }

  double calc_fare(double distance, bool local)
  {

  }

  void show_fare_info(string fullname, string destination, double fare, bool local = true)
  {


  }
</code></pre>

<p>Any help/suggestion is appreciated. As you can probably tell, I'm quite new to this. </p>
