Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Objective: The goal of this assignment is to practice two-dimensional arrays. Background: A client has contracted you to create a tracking software for gasoline pumped
Objective: The goal of this assignment is to practice two-dimensional arrays. Background: A client has contracted you to create a tracking software for gasoline pumped by a gas jockey in a week. Yes, the client is from Oregon and he is the owner of a gas station. The software will help the client measure fuel pumped by each gas jockey working at the gas station Assignment: The client will provide data of a gas jockey in the form of a text file. The name of the file is input.txt. Each line of this file indicates fueling records of a vehicle in a certain week. Each number in a line indicates gallons of gas pumped into the vehicle. A line may contain arbitrary number of double precision quantity The number of vehicles is arbitrary too. Assume that only those vehicles that were fueled at least once will appear in the input text file Your program should read the data from the file into a 2-dimensional array, where each row will keep records of fueling for a vehicle. Compute and print out the following How many total gallons of gas were pumped into each vehicle? .What is the average amount of gas pumped during a fueling for each vehicle? .What is the average gas amount pumped during the first, second, third, ..., and nth fueling of the week? n represents the maximum of the number of times each vehicle was fueled. .What is the maximum amount of gas pumped into each vehicle in a week? What is the minimum amount of gas pumped into each vehicle in a week? . Your program must have separate methods for reading in the data and for printing each of the different quantities given above. Please do not just put all of your code into the main method. From the main method, you should call all the methods. Example input file (in a week when the gas jockey pumped six vehicles): 20.0 10.0 4.5 8.45 12.0 8.0 8.0 4.1 15.2 18 20.1 7.0 14.0 17.5 6.75 9.20 10.0 9.0 15.5 Deliverables: You are expected to submit a Java file named Fueling.java via Blackboard. You have to demo your programs within one week after the due date. Your demo will be based on your last submission in the Blackboard. Your TA will instruct you with further details
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started