For the following problem statement, create an hierarchy chart using the inputs and outputs: plant abbreviation, contracted tons, Contracted sales amount, additional tons, Additional sales amount, Total sales for the plant, Plant name, Contracted price per ton, and demand.
The Metropolitan State Coal Co. (Metro) sells coal to electricity producers in Colorado to run their coal-fired power plants. Metro has contracted to deliver a set number of tons and negotiated a separate selling price per-ton with each plant. Sometimes the plant calls with a revised demand which may be more or less than the contracted amount. If the demand is greater than the contracted amount, then the price-per ton on the additional tons is 15% higher than the price-per ton for the contracted tons. For example, if Metro has contracted with a plant to deliver 100 tons at a price of $10/ton, then the sale for the contracted tons will be $10 * 100 tons = $1,000. However, if demand this week is for 120 tons, there is an additional 20 tons required beyond what was contracted. Those additional 20 tons are sold at a 15% mark-up price of $10 * 15% = $11.50 per ton. Therefore, the sales for the 20 additional tons are $11.50 * 20 tons = $230. This means the total sales for the plant are 120 tons at $1,230. When sales occur each week, Metro’s sales manager writes down on a yellow pad of paper 1) the name and abbreviation of the plant which bought coal, 2) the number of contracted tons of that plant, 3) the contracted price per ton and 4) demand for that plant. Metro needs to generate a weekly sales report using a computer program. The report needs to print the sale details for each plant: plant abbreviation, contracted tons, contracted sale amount, additional tons, additional sale amount, and total sales for the plant. Also, the report must include summary statistics for the week to include the 1) number of plants that purchased coal, 2) the total tons and sales for all the plants, 3) the number of plants that required additional coal, 4) the total tons and sales for contracted coal, 5) the total tons and sales for additional coal, 6) and the name of the plant with the highest total sales and that total sales amount.
To create a hierarchy chart for the problem statement provided, we will break down the process into main functions and sub-functions based on the inputs and outputs specified. The hierarchy chart will illustrate the relationships between these functions and how they contribute to generating the weekly sales report.
+-----------------------------------------------------+
| Generate Weekly Sales Report |
+-----------------------------------------------------+
| |
| +---------------------+ +---------------------+ |
| | Input Data | | Calculate Sales | |
| +---------------------+ +---------------------+ |
| | | | | |
| | +---------------+ | | +----------------+ | |
| | | Read Plant | | | | Calculate | | |
| | | Data | | | | Contracted | | |
| | +---------------+ | | | Sale Amount | | |
| | | | +----------------+ | |
| | +---------------+ | | | Calculate | | |
| | | Read Demand | | | | Additional | | |
| | +---------------+ | | | Sale Amount | | |
| | | | +----------------+ | |
| | | | | Calculate Total | | |
| | | | | Sales | | |
| | | | +----------------+ | |
| +---------------------+ +---------------------+ |
| |
| +---------------------+ +---------------------+ |
| | Generate Report | | Summary Statistics | |
| +---------------------+ +---------------------+ |
| | | | | |
| | +---------------+ | | +----------------+ | |
| | | Print Plant | | | | Count Plants | | |
| | | Sales Details | | | | Total Tons | | |
| | +---------------+ | | | Total Sales | | |
| | | | | Count Additional | | |
| | | | | Total Contracted | | |
| | | | | Total Additional | | |
| | | | | Highest Sales | | |
| +---------------------+ +---------------------+ |
+-----------------------------------------------------+
Generate Weekly Sales Report: This is the main function that coordinates the entire process of generating the sales report.
Input Data: This function is responsible for gathering all necessary input data from the sales manager's notes.
Calculate Sales: This function calculates the sales amounts based on the input data.
Generate Report: This function formats and prints the sales details for each plant.
Summary Statistics: This function calculates and outputs summary statistics for the week.
This hierarchy chart provides a clear structure for developing the program to generate the weekly sales