ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 04 May 2017 My Price 9.00

Salesperson Javaâ„¢ Application Part I

I have uploaded 2 files, (One is a word document listing exactly what is required, and a few notes from myself) the other is my week3Sales.java file that needs attention. I don't know what I need to do, it doesn't show they were uploaded, and secondly, do you actually help with the file that was submitted? Can someone help with the java file if possible at all. Thanks (I feel I am there with the program, it just isn't working properly and no clue where the problem is - NetBeans is a much needed program).

 

 

All RED lettering is my own personal messages to you, the black lettering is what has been and what is
due.
This is what was due last week, I have submitted it, and did well. I have lost the file I actually used as it
was overwritten since I have tried to update it to the week 3. Please read as follows.
Individual: Salesperson Javaâ„¢ Application Part I
Due Jan 30, 11:59 PM Graded POINTS 14.81/15
Paper
no new messages Objectives:
1.3 2.3
Instructions
Assignment Files
Grading
Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the
total annual compensation of a salesperson. Consider the following factors:
A salesperson will earn a fixed salary of 60000 Dollars.
A salesperson will also receive a commission as a sales incentive. Commission is a percentage of the
salesperson's annual sales. The current commission is 5 percent of total sales.
The total annual compensation is the fixed salary plus the commission earned.
The Java application should meet these technical requirements:
The application should have at least one class, in addition to the application's controlling class (a
controlling class is where the main function resides).
There should be proper documentation in the source code.
The application should ask the user to enter annual sales, and it should display the total annual
compensation.
Submit your Java sorce code (.java) file(s) using the Assignment Files tab. This is what is due this week, (Week 3).
Individual: Salesperson Javaâ„¢ Application Part II
Due Feb 06, 11:59 PM Not Submitted POINTS 10
Paper
no new messages Objectives:
2.2 3.2
Instructions
Assignment Files
Grading Modify the Week Two Java application using NetBeans IDE to meet these additional and changed
business requirements:
The company has recently changed its total annual compensation policy to improve sales.
A salesperson will continue to earn a fixed salary of 60000 dollars. The current sales target for every
salesperson is $120,000.
The sales incentive will only start when 80% of the sales target is met. The current commission is 6
percent of total sales.
If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor.
The acceleration factor is 2.
The application should ask the user to enter annual sales, and it should display the total annual
compensation.
The application should also display a table of potential total annual compensation that the salesperson
could have earned, in $5000 increments above the salesperson's annual sales, until it reaches 50% above
the salesperson's annual sales.
Sample Table: Assuming a total annual sales of $100,000, the table would look like this: Total Sales
100,000
105,000
110,000
115,000
120,000
125,000
130,000
135,000
140,000
145,000
150,000 Total Compensation
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>>
<<Program calculated value>> The Java application should also meet these technical requirements:
The application should have at least one class, in addition to the application's controlling class.
The source code must demonstrate the use of conditional and looping structures.
There should be proper documentation in the source code.
Submit your Java source code (.java) file(s) using the Assignment Files tab.
We are required to us NetBeans IDE 8.2 from the Oracle website, I have included my week3Sales.java file
as well, PLEASE, I need help finding where I went wrong as it keeps giving me an error message for even
running the actual file. Thank you in advanced. If there is something you have added, please feel free to
make me a file explaining what was needed to be added, exactly what it is, and why it was added. I am
required to explain my programming methods classes, etc. So, I need the help.

 

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package week3Sales;
import java.util.Scanner; //Required for User Input
/**
*
* @author Mike Helt
*This program will calculate a total compensation (totalComp) for a sales
representative.
* It will take the fixed income, (salesSalary) of 60,000 dollars and if a
commission (totalSales) is earned
* the compensation will then be multiplied by an accleration factor of 2. A
start of
* approximately 100,000 dollars will be the base for the 80% rate since 120,000
dollars is the
* sales target, (salesTarget). A table will display exatly what could have been
earned depending
* on the different wage incremental values.
*/
public class week3Sales
{
/**
* @param args the command line arguments
*/
public static void main(String args)
{
double totalSales = 0; // This is to be entered later from a userInput
double salesSalary = 60000; //Sales Rep fixedSalary as given
double totalComp = 0; //This is the totalCompensation calculation from
the Salary + the commision
double salesTarget = 100000; //The 80% of 120000 is now set for the
commission incentive
String table; //We now have initialized a table to setup a display for
the different incentive amounts
Prompt display = new Prompt(); //Creates object for a second Class that
is being imported later
display.question(); //The new object is used to call the second class
and then display the message
try (Scanner userInput = new Scanner(System.in) //We are storing the
inputted amount here for later use
) {
totalSales = userInput.nextInt(); //We now associate the amount
stored with totalSales for an easy recall
//Close the userInput as it is now stored or equal to the totalSales
value
} //We now associate the amount stored with totalSales for an easy
recall
if (totalSales < (salesTarget * 0.8)) //This will now calculate the 5
percent sales incentive if over the 80 percent mark
{
totalComp = 0; // We set this to zero so that the salesSalery is the
only thing to display if the goal isn't met
}
if (totalSales >= (salesTarget * 0.8)) // We now total the 5 percent
amount if the sales are over the 80 percent mark
{
totalComp = salesSalary * 0.05; //
}
if (totalSales > salesTarget)//We multiply the percentage and have it increment for exceeding the salesTarget
{
totalComp = totalComp * 2; //
}
totalComp = salesSalary + totalComp; //Total compensation is now
calculated with the salary of the representative
System.out.println("Please enclose the amount of sales for this year:
" );//This prompts the user for their sales for the year
System.out.printf("$%.2f \n \n", totalComp); //I am limiting this to 2
decimals since it is money, we added a dollar sign and added two new lines
table = "Yearly Sales "
+
"
Total Compensation \n"; //We
are now setting up the table and creating the headings
for(double i = totalSales; i <= (totalSales * 1.5); i = i+5000)//
Loop for the lines within the table are now set to increment at 5000
{
totalComp = 0; //Initialized the totalComp to zero
if(i >= (salesTarget * 0.8))
{
totalComp = i * 0.05;//We apply the compensation with the
commision if we are over the 80 percent sales target
}
if (i > salesTarget)
{
totalComp = totalComp * 2;//We now computate the total
compensation times the acceleration factor of 2 if the sales exceeds the sales
target
}
totalComp = salesSalary + totalComp; //We set the first entry for
the table
table = table + i + " \t " + totalComp + " \n"; //Table completed
the \t is for tabbing between entries and the \n for a new line
}
System.out.println("The Following Table displays the total payout of
what could have been earned through the indicated amount: \n");
System.out.println(table); //Displys the table for the Sales
representative salary with the increments amounts due to different goals
}
}

Attachments:

Answers

(11)
Status NEW Posted 04 May 2017 02:05 AM My Price 9.00

-----------

Not Rated(0)