Question: I need a Java Program Spacely Sprocket company has expanded operations and is now producing 50 different kinds of sprockets. The different sprockets are numbered
I need a Java Program
Spacely Sprocket company has expanded operations and is now producing 50 different kinds of sprockets. The different sprockets are numbered 1 though 50.
During the month of November, orders have been taken for the different sprockets. The following input file contains records where each record contains a sprocket number (1-50) followed by the quantity ordered: November Orders.txtDownload November Orders.txt
Using the above input file of orders, rewrite the Spacely Sprocket program to produce a summary report for all 50 sprockets produced. Rather than using 50 separate accumulator variables, you must use a single array to represent the 50 different accumulators. Use the array and loops in your program to summarize the orders and output the report. Don't forget to initialize each of the array locations to 0 (because they are accumulators). For full credit, be sure to display the report in a Scrolling Pane in a Window.
Can anyone sumbit the Project Folder
Submit your zipped project folder by the due date.
The bottom code was reffered by an expert here but it doesnt work in netbeans
import javax.swing.JOptionPane; import java.io.File; import java.io.FileNotFoundException;
import java.util.Scanner;
public class SpacelySprocket { public static void main(String[] args) { int[] sprocketOrders = new int[50]; //Array of size 50 to store all of the sprocket orders //Initialize all array locations to 0 for(int i=0; i This code gives me errors in NetBeans i need this program to run smoothly in netbeans with the data file in the src folder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
