Develop the program using functional decomposition

Assignment Help C/C++ Programming
Reference no: EM132432145

You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. 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 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). 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.

Here is an example run:

Enter item: P 10 2 4 8

10 2x4x8 Pine, cost: $47.47

Enter item: M 1 1 12 8

1 1x12x8 Maple, cost: $36.00

Enter item: T

Total cost: $83.47

Develop the program using functional decomposition, and use proper style and documentation in your code. Your program must make appropriate use of value-returning functions in solving this problem. Make sure that the user prompts are clear and that the output is labeled appropriately.

Reference no: EM132432145

Questions Cloud

Record the transactions in Speedy Transport Ltds journal : Speedy has a separate accumulated depreciation account for each of these assets except Land. Record the transactions in Speedy Transport Ltd.'s journal
Graphic Display Of Sociological Theories Assignment : Graphic Display Of Sociological Theories Assignment help and solutions:- illustrate the relationship between the foundational sociological theories
How much the user would weigh on that planet : The program, via the switch statement, then outputs how much the user would weigh on that planet.
Explain how this impacted your perception of business : Have you witnessed unethical practices in workplace? If so, please share your experience with class and explain how this impacted your perception of business.
Develop the program using functional decomposition : Develop the program using functional decomposition, and use proper style and documentation in your code. Your program must make appropriate use
Socialization and Social Structure Assignment : Socialization and Social Structure Assignment help and solutions:-Different societies have different social structures. What is social structure?
Describe economic trade off faced by the Fed : Describe an economic trade off faced by the Fed in achieving its economic policy objectives. Why might the Fed's monetary policy depend on the fiscal policy.
Determine for Adelphi Company the Cost of Goods Sold : Adelphi Company uses absorption costing. Use this information to determine for Adelphi Company the FY 2018 Cost of Goods Sold
Calculate the balance of a checking account : You need a program that will calculate the balance of a checking account. The user will input the account name, old balance, total deposits, and total checks

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd