Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help my code keeps just repeatingPRogRAMIING: USER - DEFINEd DATA TYPEs ASsIGNMENT INSTRUCTIONS OVERVIEW You will create user - defined data types and use

Please help my code keeps just repeatingPRogRAMIING: USER-DEFINEd DATA TYPEs ASsIGNMENT INSTRUCTIONS
OVERVIEW
You will create user-defined data types and use them to collect order information from a
customer. Using a control loop, get order information from the customer and then display the
total order when the customer is finished.
INSTRUCTIONS
Imagine you are working for a lumber company, and your employer would like a program that
calculates the cost of lumber for a customer order. The company sells pine, fir, cedar, maple, and
oak lumber. The lumber is priced by board feet. One board foot equals one square foot that is one
inch thick. The price per board foot is given in the following table:
Pine 0.89
Fir 1.09
Cedar 2.26
Maple 4.50
Oak 3.10
The lumber is sold in different dimensions (specified in inches of width and height, and feet of
length) that need to be converted to board feet.
For example, a 248 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent
to 5.333 board feet , which when divided by 12=5.333 board feet).
Create a blank c++ file.
Give the customer instructions and then ask the user (customer) to identify the items
they wish to purchase by inputting the type of wood, the length, width, & heights of the
board, and the number of boards they desire.
Allow the user to continue adding items to their order until they wish to get a total.
Once they ask for a total - the program will display a receipt of all items to
purchase and the total
An entry from the user will be in the form of a letter and four integer numbers. The integers are
the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O
(corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no
integers following it on the line. The program should print out the price for each entry and print
the total after T is entered.
Enter item: Pine 10 boards 248
10248 Pine at a cost of 47.47
Enter another item (or press T for the total) Maple 1 board 1128
11128 Maple at a cost of 36.00
Enter another item (or press T for the total)T
The total for
10248 Pine at a cost of 47.47
11128 Maple at a cost of 36.00
is 83.47
image text in transcribed

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 Systems For Advanced Applications 9th International Conference Dasfaa 2004 Jeju Island Korea March 2004 Proceedings Lncs 2973

Authors: YoonJoon Lee ,Jianzhong Li ,Kyu-Young Whang

2004th Edition

3540210474, 978-3540210474

More Books

Students also viewed these Databases questions

Question

What is project success?

Answered: 1 week ago