Question: Do not use global variables. You must demonstrate correct parameter passing between modules. Income You own a gas station that sells premium and regular unleaded

Do not use global variables. You must demonstrate correct parameter passing
between modules.
Income You own a gas station that sells premium and regular unleaded gas and diesel. You are going to
calculate gross income for the month, total gas taxes collected, and your business's net income (total
sales less gas taxes).
User Inputs
Processing
Outputs
Notes/Hints
cost per gallon of premium gas
cost per gallon of regular gas
cost per gallon of diesel
gallons of premium sold
gallons of regular sold
gallons of diesel sold
gas tax per gallon (not per dollar) entered in dollars and cents.
a. Create a calculatePremiumincome module to calculate and return total income
from premium gas
b. Create a calculateRegularincome module to calculate and return total income
from regular gas
c. Create a calculateDiesellincome module to calculate and return total income
from diesel
d. Create a calculateTotalSales module to calculate and return total (gross) sales
(regular + premium + diesel income)
e. Create a calculateTotalTaxes module to calculate and return total taxes
f. Create a calculateBusinessincome module to calculate and return total income
businessincome (total sales - total taxes)
g. Create an printIncomeReport module
The printIncomeReport module will print the values that were entered for the inputs
(1.-7. above) and print the results (a.- g. above) with appropriate labels.
Always use meaningful variable names.
Always print descriptive labels on the outputs.
You will need to decide what inputs each module needs to have passed in or
collected from the user to perform the required calculation(s).
Do not use global variables. You must demonstrate

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 Programming Questions!