Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Let's think about the steps that take place in a program and write pseudocode for the program. A retail company must file a monthly

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
1. Let's think about the steps that take place in a program and write pseudocode for the program. A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Write pseudocode for a program that asks the user to enter the total sales for the month. The application should calculate and display the following: The amount of county sales tax The amount of state sales tax The total sales tax (county plus state) . Step 1: This program is most easily solved using just four variables. Declare the variables that you will need in the program, using the proper data type and documenting the purpose. Declaration Declare Real totalSales Purpose Stores total sales the user inputs Step 2: Given the major task involved in this program, what modules might you consider including? Describe the purpose of each module. Module Name Module inputData() Purpose Allows the user to enter required user input Step 3: Complete the pseudocode by writing the missing lines. Also, when wnting your modules and making calls, be sure to pass necessary variables as arguments and accept them as reference parameters only if they need to be modified in the module. Note that we are using global constants for the state and county sales tax rates. I lolotants for the tax rates Constanta STATE TAX RATE.06 Constanta COUNT_TAX_RATE= .02 Module main 1/Declare col variables //Houte calla Call input totales Call recounty tales, tax //this nedule inputs the cat mai data required I am the user Module DR Mot totales Display Enter the total ales at the month." Toput total El Module this dute calculates county tax reta Sales can be a value parameter because it is not changed in the module leantyter ut betere pariter because chased in the saddle adute caleCounty cheat totalles, Real x antyal Set contax totales COUNTY TAX BATE End Module this module calculate state tax Module En Module this matte calouste total tax this made the total. Coty te tax Module End Module Step 3: Complete the pseudocode by writing the missing lines. Also, when writing your modules and making calls, be sure to pass necessary variables as arguments and accept them as reference parameters only if they need to be modified in the module. Note that we are using global constants for the state and county sales tax rates. // global constants for the tax rates Constant Real STATE TAX_RATE - .04 Constant Real COUNTY_TAX_RATE= .02 Module main //Declare local variables Declare Real totalSales //Module calls Call inputData(totalSales) Call caleCounty (totalSales, countytax) End Module //this module inputs the total sales data required //from the user Module input Data (Real Ref totalSales) Display "Enter the total saies for the month." Input totalSales End Module //this module calculates county tax //totalsales can be a value parameter because it is not //changed in the module. //county Tax must be a reference parameter because it is // changed in the module Module calcCounty (Real totalSales, Real Ref countytax) Set county Tax - totalSales . COUNTY_TAX_RATE End Module //this module calculates state tax Module End Module V/this module calculates total tax Module End Module //this module prints the total, county, and state tax Module End Module

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

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

What clues might indicate an unreliable franchisor?

Answered: 1 week ago

Question

1. What physical and mental tasks does the worker accomplish?

Answered: 1 week ago

Question

6. What data will she need?

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago