Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

Week 5 Java Programming II final

GUI requirements:

 

The Swing application will provide a GUI that allows a user to enter the following data items:

 

  1. Sales representative ID
  2. Sales representative First Name
  3. Sales representative Last Name
  4. Total sold for each of three categories: office supplies, books, and paper
  5. Sales district (North, South, East, West)
  6. Preferred means of contact with potential buyers (phone, e-mail, visit)

 

The Swing application will contain the appropriate GUI components to enter the sales information and provide buttons QUIT, ENTER, EVALUATE, and DISPLAY.

 

QUIT Button Requirements:

 

Provide a QUIT button to exit the application.

 

ENTER Button Requirements:

 

Create an ENTER button that causes the sales representative’s data to be retrieved from the GUI components and submitted to the application. Each time the ENTER button is pressed, the data will be written to the file. Name the output file salesrep.txt.

 

Write the data in the following format to a text file, using white spaces as the delimiter. Include the categories (SUPPLIES, BOOKS, PAPER) in your file to label the dollar amount sold for each category. Sales district entered should be converted to upper case (NORTH, SOUTH, EAST, WEST). Independent line separators should be used in the output file. Code for the ENTER button should be well commented.

 

Format of your output file, salesrep.txt:

 

salesRepID firstName lastName SUPPLIES totalAmountSuppliesSold BOOKS totalAmountBooksSold PAPER totalAmountPaperSold district contactMeans

 

Example output file contents:

 

1001 Jennifer Ward SUPPLIES 2140.20 BOOKS 5200.10 PAPER 455.23 NORTH Phone
1003 Athena Andrews SUPPLIES 5155.55 BOOKS 6300.50 PAPER 223.25 SOUTH Email

 

Each time the ENTER button is pressed, the application should append a new line to the file, salesrep.txt. When the application starts, the file should be opened for appending. This file is to keep a running history of the entered data.

 

EVALUATE Button Requirements:

 

Provide an EVALUATE button. Each time the EVALUATE button is selected, the sales representative data will be read from the output file, salesrep.txt, that was created and the amounts sold in SUPPLIES, BOOKS, and PAPER will be totaled. If the amount sold on all three categories is greater than or equal to (>=) $8,000, write the sales representative data to a new file stars.txt. These sales representatives will receive a bonus to demonstrate your company’s appreciation for a job well done.

 

Your stars.txt file should not be opened for appending each time the application is run. Independent line separators should be used in the output file. Code should be well commented.

 

An example of the format of your stars.txt file:

 

salesrepID firstName lastName SUPPLIES totalAmountSuppliesSold BOOKS totalAmountBooksSold PAPER totalAmountPaperSold district contactMeans

 

DISPLAY Button Requirements:

 

Create a DISPLAY button. When this button is selected, the stars.txt file will be read in and displayed. Create a Sales Representative class that stores sales representative information. A Sales Representative object will be created for each sales representative that is read in when the DISPLAY button is selected. Select appropriate attributes for your Sales Representative. Ensure that you have created appropriate constructor(s) that will allow you to create sales representatives with the values read in from the file for sales rep ID, sales rep first name, sales rep last name, and so on.

 

With each Sales Representative that is read in from your stars.txt input file, you will create a Representative object that holds the sales representative data and add each Representative object to an ArrayList. Do not store your sales representative information as a String and add this String into your ArrayList. You must use your Representative class to create Representative objects. You should store Representative objects that encapsulate your sales representative information and store these in your ArrayList.

 

Hint: You may want to look into overriding toString() method to provide a readable string representation of Representative object.

 

After the ArrayList has been created, this ArrayList will be iterated over and displayed to the jTextArea. Override the toString() method for your Representative class so that each sales representative is printed in a readable manner. Total sales representatives should also be displayed.

 

Design requirement: You must use an ArrayList to collect all Representative objects that represent the sales representative data in the file.

 

An example of the printing of the contents of the ArrayList:

 

TOTAL SALES REPRESENTATIVES: 2

101 Jeannette Roberts
Supplies: 850.20
Books: 950.10
Paper: 855.23
SOUTH
PHONE

102 Anthony Laine
Supplies: 875.55
Books: 1000.50
Paper: 908.25
NORTH
EMAIL

 

Intermediate-level Java programming should be demonstrated in your application:

 

  • There should be implemented constructors for each class.
  • The toString() method should be overridden to provide readable string representation of each object.
  • The getters and setters should be implemented to enforce data hiding.
  • The code should be fully commented.
  • The program flow should be logical.
  • Behavior should be encapsulated into methods avoiding all-encompassing large main() methods.
  • The project should be developed in NetBeans and zipped prior to submission.
  • The code should compile and run free of exceptions indicating that debugging tools were used to eliminate any run time errors.

 

Submit a zipped NetBeans project and a design document that contains a description of the system, your GUI design, and the pseudocode and class diagrams.

 

Competency Test

 

The second part of the key assignment is a competency test that will test you on debugging tools; commenting and structuring programs properly; and Java Swing events, event handling, streaming, file processing, and data structure. If you do not pass this competency exam, you will not be able to proceed to IT351. Answer the questions True or False.

 

  1. The Formatter class allows you to append to a file.
  2. Example syntax for opening a file for reading is:

    Scanner sc = new Scanner(“sales.txt”);

  3. The Scanner class allows you to parse your input file as you read it in.
  4. In the Java API, Maps inherit from the interface Collection.
  5. You could use Collections.sort() to sort a HashSet.
  6. Implementations of the Map interface provided by the Java API include WeakHashMap and HashTable.
  7. The length() method for ArrayList will return the number of elements in the list.
  8. You need to provide an estimate on the maximum number of elements you might store in an ArrayList when allocating memory for an ArrayList.
  9. Duplicate keys are allowed in a TreeMap.
  10. Before inserting a value into a TreeSet, you need to make sure it hasn’t already been added to the TreeSet.
  11. You cannot store user-defined objects into an ArrayList.
  12. Example syntax for opening a file for reading is:

    BufferedReader in

    = new BufferedReader(new FileReader(“stars.txt”));

  13. FileWriter allows you to append to a file.
  14. The setText() method can be used to set the value of a jTextField.
  15. The isSelected() method can be used to determine if a jRadioButton has been selected.
  16. A Swing application uses GUI components from the java.swing package.
  17. To write out a platform independent line separator to a file, you could write out the String that is returned from System.getProperty (“line.separator”).
  18. You could use the printf() method to write formatted output to a file if you use PrintWriter.
  19. You could use the hasNext() method on the Scanner class to see if you had more data to read in.
  20. You could use the value returned from the getText() method on the jTextField class in a mathematical operation without first converting to a numeric type.

 

Please submit your assignment.

 

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW


Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.