Week 3 Java Program II DB

  

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Please review the instructions for the Phase 3 IP and respond to the following questions:

After reading the requirements for the upcoming Phase 3 IP, explain how you will approach enhancing the application to meet the stated requirements.Provide your pseudocode for accumulating the totals sold in each category. Each time the EVALUATE button is selected, the sales representative data will be read 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.        

Phase 3 Individual Project

     

Deliverable Length: 1 Zipped NetBeans project
Details:

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus. NOTE: All submission posting times are based on midnight Central Time.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

It is time to enhance the application to read the sales representative data file and process. They are interested in identifying their star performers in their sales force. Management would like to create a group of these star performers for a few reasons. They would like these stars to mentor the rest of the sales force, and they would like to reward their success. Sales representatives in the stars group have sold at least $8,000 in products.

Application requirements:

Expand your application to include an EVALUATE button. Each time the EVALUATE button is selected, the sales representative data will be read 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 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. The 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

This functionality is in addition to functionality coded for the previous assignments. The application is enhanced with additional functionality during each iteration phase.

Be sure you use the debugger if at first you do not observe the results expected.

Intermediate-level Java programming should be demonstrated:

Program flow should be logical.Projects should be developed in NetBeans and zipped prior to submission.Your application should execute by running the main project.Do not submit any code within your project that is not related to this assignment.Applications that do not compile will receive feedback but not a passing grade.

 

Contents

GUI DESIGN

2

Java Swing Components Suitability

2
Sales Representative User Interface 2

PSEUDOCODE

3

ACTION_ENTER

3

ACTION_QUIT

4
REFERENCES 5

GUI DESIGN
Java Swing Components Suitability

FIELD

SWING COMPONENT

SUITABILITY

· Sales Representative ID
· Representative First Name
· Representative Last Name
· Office Supplies Sales
· Book Sales
· Paper Sales

JTextField (One for each field)

Suitable for entry and display of short string values. These fields will all hold values that are no more than a few characters and therefore can be displayed in only one short line within a text box component.

· Sales Districts

Grouped JRadioButtons (One for each district)

Suitable where there are multiple options to choose from and the user is allowed to select only one option

· Means of Contact

JCheckBox (One for each option)

Suitable where there are multiple options to choose from and the user is allowed to select more than one option

· Quit Application
· Submit Entries

JButton (One for each function)

Suitable for triggering action events

Means of Contact:

Sales District:

QUIT

ENTER

West

East

South

North

Last Name:

Representative ID:

Papers:

Books:

Office Supplies:

Sales Representative User Interface
First Name:

Phone

Visit

Email

PSEUDOCODE

Variables : rep_id, first_name, last_name, office_supplies, book_sales, paper_sales, district, phone, email, visit;

ACTION_ENTER

{

IF (All required fields have been filled)

SET rep_id;

SET first_name;

SET last_name;

SET office_supplies;

SET book_sales;

SET paper_sales;

SET phone;

SET email;

SET visit;

IF (North isSelected) SET district = North;

ELSE

IF (South isSelected) SET district = South;

ELSE IF (EAST isSelected) SET district = East;

ELSE SET district = West;

ELSE

Prompt user to enter missing values

}

ACTION_QUIT

{

IF (there are pending changes)

Prompt to SAVE;

EXIT App;

}

REFERENCES

1. Starting Out With Java From Control Structures Through Objects (5TH Edition) – Tony Gaddis

Chapter 12 (A First Look at GUI Applications)

Still stressed with your coursework?
Get quality coursework help from an expert!