Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Management Competitiveness and Globalization, Concepts and Cases

Authors: Michael A.Hitt, R.Duane Ireland, Robert E.Hoskisson

11th edition

978-1285425177, 1285425170, 978-1305200333, 978-1285425184

More Books

Students also viewed these General Management questions

Question

Explain what human resource information systems are used for. P-96

Answered: 1 week ago

Question

Describe the importance of human resource planning. P-96

Answered: 1 week ago