Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are working for the Passaic County Community Carpet Center. Your boss has asked you to write and execute a program that will generate customers

You are working for the Passaic County Community Carpet Center. Your boss has asked you to write and execute a program that will generate customers bills. Input consists of the following:

The Customer name (a string containing a blank)

The Customers id number (an integer) The Length and the Width of a room in feet and inches (Integers) The carpet price per square foot (float) The percentage of discount for each customer (float)

The labor cost is fixed at $1.65 / Sq foot, the tax rate is 6.825% and they are defined as constants.

Your programs design should use the function main () and the sub-functions noted below:

a. setdata( ) a function that allows you to input the data from the keyboard (all variables are passed by reference so they may return their values to the calling function). The function itself returns the area of a carpet needed in square feet to cover the room. Note that every fraction of a square foot is a square foot.

b. calculations( ) this is a function that calls the following three functions. Calculate the installed price calcinstalled( ) = cost of carpet + cost of labor Calculate the subtotal calcsubtotal ( ) = installed price - discount Calculate the total price calctotal( ) = the subtotal + taxes There may be intermediate calculations. It might also be possible to reuse a function, if it accomplishes the same task with different arguments

. c. showresult( ) is a function that calls three sub-functions headings( ) the name of the company, customers name, borders etc. measurements( ) a subroutine to print the length, width and area. Charges( ) prints the charges.

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

What were the reasons the collective agreement was achieved?

Answered: 1 week ago

Question

What does Copp say is the most important asset of any airline?

Answered: 1 week ago