What are the inputs and outputs for the following problem statement?
You must build a program where the user enters names, and when the user is finished the computer displays the total number of names that have been entered. To use the program, the user will enter names, one at a time. Immediately after the user enters a name the computer displays the name. After the user has entered all the names that she wants to, she will enter the word “Bozo.” Upon entering “Bozo,” the program will output the number of names entered, not including “Bozo.”
Example:
Bob runs a food truck business with four trucks. Every day, each truck leaves the warehouse and travels to a different part of town, selling food at multiple construction sites. To better understand his business, he collects metrics every day for each truck. The metrics include 1) the number of sites visited, 2) the cost of gas for the day, and 3) the revenue. Each day in the morning, the first thing Bob wants to do is generate a consolidated report of the previous days’ metrics. Bob has hired you to develop a program that he can run on a computer, where he can enter those previous day’s metrics and be shown a consolidated output report. To enter metrics into the program, Bob will first enter the date - one time only. After this he will start entering the data for each individual truck in this order; Truck ID, number of Sites visited, Gas Expense, and Revenue. After each item of data has been entered, that data should immediately be shown to Bob on the computer screen to allow him to ensure the data is correct. After all the data for a given truck is entered, the program should display the profit for that truck, calculated as the Revenue minus the Gas Expense. After Bob has entered ALL the data for ALL the trucks, he should enter the value “End” as a Truck ID to let the program know that there will be no further entries. After Bob has entered “End”, the program should display a summary of the data. The summary must display the overall Total Number of Trucks, Total Gas Expense, Total Revenue, Total Profit, and the Average Profit for the trucks. Additionally, the report must display the Highest Profit out of all the trucks, and Truck ID which had that Highest Profit. In the event of more than one truck earning the Highest Profit, only the first Truck entered into the system should be reported.
Inputs: report date, Truck ID-code (for each truck), Number of sites visited (for each truck), Gas expense (for each truck), Revenue (for each truck).
Outputs: profit, total number of trucks, total gas expense, total revenue, total profit, average profit, highest profit, truck ID-code.
Based on the problem statement provided, here are the inputs and outputs for the program: