A custom tailor offers a variety of custom suit options to customers. The company has tasked you with creating a program that will allow tailors to enter information about the kind of material used to make the customer's custom suit and the number of square yards used to make the suit and will determine the total cost to charge the customer. Use the following steps to create the program: The program should display a menu that asks the technician to select the type of material that was used. Make sure the menu is formatted exactly as in the Sample Input and Output of the instructions (including indentation). The program should determine the cost per square yard of the material. The cost per square yard is determined based on the type of material that is used. Table 1: Type of Material and Cost per Square Yard The program should then ask the tailor to enter the number of square yards of material that they used to make the custom suit. Calculate the material cost, which can be found by multiplying the cost per square yard times the number of square yards. Calculate the labor cost. The labor cost is 35% of the material cost. Calculate the subtotal cost of the service. The subtotal is the sum of the material cost and labor cost. Calculate and apply a 5% discount to the subtotal if 4 or more square yards of material were used. If under 4 square yards were used, the discount is 0. Calculate the total cost of the service by subtracting the discount from the subtotal. Display the text "Custom Suit Calculator" at the top of the output. (See Sample Input and Output) The program should display the material cost, labor cost, subtotal, discount, and total cost (formatted to two decimal places). Format the output of the program exactly as shown in the sample output (including indentation, spacing, and number of decimal places). Sample Input and Output (formatting, spacing, and indentation should be as shown below) Satin Linen Leather Silk Please select a material type from the menu above: 3 Enter the number of square yards of material it took to make the custom suit: 5.3 Custom Suit Calculator Material Cost: $97.79 Labor Cost: $34.22 Subtotal: $132.01 Discount: $6.60 Total Cost: $125.41
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
A custom tailor offers a variety of custom suit options to customers. The company has tasked you with creating a
Use the following steps to create the program:
- The program should display a menu that asks the technician to select the type of material that was used. Make sure the menu is formatted exactly as in the Sample Input and Output of the instructions (including indentation).
- The program should determine the cost per square yard of the material. The cost per square yard is determined based on the type of material that is used.
Table 1: Type of Material and Cost per Square Yard
- The program should then ask the tailor to enter the number of square yards of material that they used to make the custom suit.
- Calculate the material cost, which can be found by multiplying the cost per square yard times the number of square yards.
- Calculate the labor cost. The labor cost is 35% of the material cost.
- Calculate the subtotal cost of the service. The subtotal is the sum of the material cost and labor cost.
- Calculate and apply a 5% discount to the subtotal if 4 or more square yards of material were used. If under 4 square yards were used, the discount is 0.
- Calculate the total cost of the service by subtracting the discount from the subtotal.
- Display the text "Custom Suit Calculator" at the top of the output. (See Sample Input and Output)
- The program should display the material cost, labor cost, subtotal, discount, and total cost (formatted to two decimal places).
- Format the output of the program exactly as shown in the sample output (including indentation, spacing, and number of decimal places).
Sample Input and Output (formatting, spacing, and indentation should be as shown below)
- Satin
- Linen
- Leather
- Silk
Please select a material type from the menu above: 3
Enter the number of square yards of material it took to make the custom suit: 5.3
Custom Suit Calculator
Material Cost: $97.79
Labor Cost: $34.22
Subtotal: $132.01
Discount: $6.60
Total Cost: $125.41
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images