Create a Java application that processes kinds of businesses sales data. Your input file is a csv file named SalesData.txt. Each record in the file consists of 3 fields, separated by commas.

Field 1: String an ID for a kind of business
Field 2: String a kind of business
Field 3: Int yearly sales (in millions of dollars) for that kind of business

Please download the Netbeans starter project "LabExamProvided" from Canvas. It is in zip format. It already contains the input file described above. It also has empty shells for:

Business.java Write your class definition for a "kind of business" here
BusinessGUI.java Design and code your GUI here

Business.java should contain the class definition for Business objects. You should write your code so that each Business object contains instance variables for each of the fields described above. You will also need to write the necessary constructors, accessors (aka "get" methods), and mutators (aka set methods) needed to make your program work. You should also consider what additional methods you might need to write (such as toString, equals, compareTo).

BusinessGUI.java should contain your implementation of a GUI. Your GUI must create an array (or ArrayList if you so choose) of Business objects. Your array should include as many objects as records in the input file. Once the array is loaded with data, your GUI should allow the end user to query

  • the minimum yearly sales across all "kinds of businesses"
  • the maximum yearly sales across all "kinds of businesses"
  • the average yearly sales across all "kinds of businesses"
  • the count of all Business objects

Extra Credit:

Add a capability to the GUI that allows the end user to create new Business objects and add them to the array. The GUI should verify that sales data is a non negative integer value, and gracefully recover if the user attempts to enter something else for sales value. As these new Business objects are added to the array, you will also want to be sure that queries for minimum yearly sales, maximum yearly sales, average yearly sales, and count of all objects correctly take into account any newly created objects. Extra credit points will only be awarded if the create feature works completely - that is, there will be NO PARTIAL CREDIT for extra credit work.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.