Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This lab lesson you are writing a program for the hypothetical Acme Wholesale Copper Wire Company. The Acme company sells spools of copper wiring for

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

This lab lesson you are writing a program for the hypothetical Acme Wholesale Copper Wire Company. The Acme company sells spools of copper wiring for $100 each. Write a program that displays the status of an order. This program will be reading in from cin and writing to cout. In this program you will need at least three functions, including main as one of the three. Read function You need to have a function that reads in the following data: The number of spools ordered The number of spools currently in stock Any special shipping and handling charges (see description below). Your program needs to prompt for these values. The prompts are below under Sample with special shipping and handling. Here is the general logic for the read function: Prompt for spools to be ordered Read in the value for spools order If the spools ordered is less than 1 display a message (see below for details) and return false Prompt for the number of spools in stock Read in the value for number of spools in stock If the spools in stock is less than 0 display a message and return false Ask if there is special shipping and handling If yes (y) Prompt for shipping and handlingamount Read in the shipping and handling amount If the shipping and handling charge is less than 0 display a message and return false If the shipping and handling question returned something other than y Set shipping and handling to the default value ($11.88) The normal shipping and handling is $11.88 per spool. You will have to ask if there is special shipping and handling. If there is you will need to read in the special shipping and handling charge. Here are a couple of sample runs. One with the default shipping and handling and one with special shipping and handling. Sample with default shipping

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago