Question: Questions for the programming experts: How would you guys handle flowcharts with specific coding (see below) or would the flowchart be based on the individual

Questions for the programming experts: How would you guys handle flowcharts with specific coding (see below) or would the flowchart be based on the individual doing it?

Specific code mentioned:

#include

using namespace std;

double getHours();

char menu();

double calculateBill(double hours, char packageChoice);

void printMonthlyBill(double bill);

int main()

{

int packageChoice=menu();

double hours=getHours();

double bill=calculateBill(hours, packageChoice);

printMonthlyBill(bill);

system("pause");

}

double getHours()

{

double hours;

cout"please>

cin>>hours;

return hours;

}

char menu ()

{

char packageChoice;

cout"[1]>

cout"[2]>

cout"[3]>

cout"please>

cin>>packageChoice;

return packageChoice;

}

double calculateBill(double hours, char packageChoice)

{

switch (packageChoice)

{

case 'a':

case 'A':

if (hours

{

return 9.95;

}

else

{

return (hours - 10)*2 + 9.95;

}

case 'b':

case 'B':

if (hours

{

return 13.95;

}

else

{

return (hours - 20) + 13.95;

}

case 'c':

case 'C':

return 19.95;

default:

cout"invalid>

return 0;

}

}

void printMonthlyBill(double bill)

{

cout"monthy>

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!