• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need a few suggestions for assignment.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I am learning Java in Net Beans and I unfortunately got behind on my assignment because a relative passed away on my brother in law's side and I had to take some down time to support my sister's family. Now I have already accepted my assignment will probably be late because it's due tonight and there's just no way. I did try to get a head start but I'm just going to be straight up honest I do not understand where to even begin with my assignment. I know it's not your policy to do homework. I am not asking this. But any pointers, advice or a link to something that may help would be much appreciated!

There are two parts to my assignment.

To understand the assignment I must share the part of the assignment from last week which is finished and a tad unpolished I know.

First class...




Now the part of the assignment I'm now working on is in a second class attached. I will repeat yet again I have no idea what I am doing... sadly



The first part of the assignment is to change the commission that the employee doesn't start earning commission until they've earn up to 80% or more of the company goal of $120,000.

Now my instructor keeps telling me that I'm not creating the method right and I'm sure he's right but I don't really know... how to fix it...

The second part is to create a sample table showing potential annual compensation in $5000 increments.

The table I have a kind of idea of how to do the table but I just don't know where to start... I wish I had an example to go off of...

Now if I could have that "Ah hah!" moment on even just one of these... I would be so happy! I think a good place to start is to first focus on the 80% part and then worry about the sample table after.

Here are the assignment instructions if anyone is curious...



"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 $12,000. The current sales target for every salesperson is $120,000.
The sales incentive will start only when 80% of the sales target is met. The current commission is 7% of total sales. For example, if my target is $120,000, 80% of that is $96,000. If I sell $95,000, I get no commission. If I sell $96,000, I get 7% of that amount.
If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.25. If my target is $120,000 and I sell $120,000, my commission is 7% of that amount. If I sell $121,000, then my commission is 7% of $120,000, PLUS (7% of $1,000 multiplied by 1.25).
The application should ask the user to enter annual sales, and it should display the commission amounts (regular and accelerated), salary, commission rate, and the total annual compensation.
The main() method in the application should also display a table of potential total annual compensation that the salesperson could have earned, in $5,000 increments above the salesperson's annual sales, until it reaches 50% above the salesperson's annual sales. The table should start at the current total sales.
Sample Table: Assuming a total annual sales of $98,765.43, the table would look like this:

Total Sales
Total Compensation
98,765.43
<<Program calculated value>>
103,765.43
<<Program calculated value>>
108,765.43
<<Program calculated value>>
113,765.43
<<Program calculated value>>
118,765.43
<<Program calculated value>>
123,765.43
<<Program calculated value>>
128,765.43
<<Program calculated value>>
133,765.43
<<Program calculated value>>
138,765.43
<<Program calculated value>>
143,765.43
<<Program calculated value>>

The Java application should also meet these technical requirements:
You are not allowed to use any static variables. Your main() method is static, and that's okay.
The application must now have a second class (and .java file). Name it CommissionCalculator. This second class should contain all of the commission calculations. So, for example, move your calculation (where you multiply sales by commission rate to yield commission amount) to this new class.

That means you first have to tell NetBeans to create a new class, called CommissionCalculator. That class should probably have a single field for the commission rate. It should probably also have a method called CalculateCommission, which takes a sales amount as an argument. It would multiply that amount by the rate and return the commission amount. (If all this sounds like gobbledy-gook, ask questions in class!)

Your week 2 project and class are called CommissionCalculatorApp (the "App" at the end stands for "application"). That class has a "main()" method in it. Currently, from week 2, the code in main() prompts the user for input, performs some calculations, and displays the results of the applications. This week you must take the commission calculation out of main() and put it into a method in CommissionCalculator (not CommissionCalculatorApp).

So, you should modify your main() method to 1) create a new CommissionCalculator object, 2) prompt the user for input, such as total annual sales, 3) use the new object you just created to calculate the commission, 4) in your main() method, calculate total annual compensation, etc., 5) in your main() method, display the results of the calculations, and 6) in your main() method, calculate values for the table and display those values in table format.
The additional class must have member variables (such as the commission rate already mentioned; any others come to mind?).
The additional class is not allowed to display anything.
The additional class is not allowed to input/read anything from the keyboard.
The additional class is not allowed to refer to any variables in the CommissionCalculatorApp class by name. This means that the only variables the CommissionCalculator class can use are 1) its own variables, 2) automatic variables, and 3) methods can refer to their arguments.
The additional class is not allowed to calculate total compensation.
The main() method is not allowed to calculate the commission amount. It must, however, calculate the total annual compensation.
The source code must demonstrate the use of conditional and looping structures.
There should be proper documentation in the source code.
The table above doesn't need borders, etc. You just need to display two columns of numbers, with a header (Total Sales   Total Compensation).
You must display money values (currency) with a dollar sign ($) and exactly two decimal places/ You need not use commas.
Use parentheses to explicitly specify the order of operations. Ask questions if you have any.
When I test/run your program I might enter negative numbers, or 0 when asked to input data (such as annual sales). Your program should check for that, complain if it finds a problem, and ask again (and ask again and again, until I enter valid data). You have to determine if the number is valid. For example, is 0 a valid number when entering annual sales? Is -1000?
When I test/run your program I will not enter data that might cause your program to crash. For example, if you ask for a number, I will always enter a number; I won't enter "xyz."
When you ask for annual sales, I will input just a number, possibly with a decimal point and cents. I will not input a dollar sign nor will I enter a comma."
 
Amber Ray
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see that these forums are still active and many people have been replying to other posts but no one has replied... I hope someone will help me out. :/
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amber Ray wrote:
To understand the assignment I must share the part of the assignment from last week which is finished and a tad unpolished I know.



My first recommendation would probably be to polish the previous program. Remember that you are building upon the first program. Think of it like housing construction, where you are trying to add a second floor addition. If you do get the first floor (infrastructure) sturdy enough, it will be very difficult to build upon it.

Henry
 
Amber Ray
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Amber Ray wrote:
To understand the assignment I must share the part of the assignment from last week which is finished and a tad unpolished I know.



My first recommendation would probably be to polish the previous program. Remember that you are building upon the first program. Think of it like housing construction, where you are trying to add a second floor addition. If you do get the first floor (infrastructure) sturdy enough, it will be very difficult to build upon it.

Henry



Unfortunately i do not have time to worry about small details. As I said the assignment will already be late. I need to worry about the main portion now.
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amber Ray wrote:
The first part of the assignment is to change the commission that the employee doesn't start earning commission until they've earn up to 80% or more of the company goal of $120,000.

Now my instructor keeps telling me that I'm not creating the method right and I'm sure he's right but I don't really know... how to fix it...



This is basically a math problem. With you previous program, you earned a certain percentage of the earnings -- very simple math. With this version, this commission doesn't apply until you hit 80% of goal. The math is still the same, but it doesn't get applied until a goal is reached. So, once the goal is reached, then the commission is paid -- prior to that, the commission is zero.

I highly recommend that you work out the math (preferably on paper) first. Programming is teaching the computer to do something, and you can't do that until you understand it first.

Henry
 
Amber Ray
Greenhorn
Posts: 5
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Amber Ray wrote:
The first part of the assignment is to change the commission that the employee doesn't start earning commission until they've earn up to 80% or more of the company goal of $120,000.

Now my instructor keeps telling me that I'm not creating the method right and I'm sure he's right but I don't really know... how to fix it...



This is basically a math problem. With you previous program, you earned a certain percentage of the earnings -- very simple math. With this version, this commission doesn't apply until you hit 80% of goal. The math is still the same, but it doesn't get applied until a goal is reached. So, once the goal is reached, then the commission is paid -- prior to that, the commission is zero.

I highly recommend that you work out the math (preferably on paper) first. Programming is teaching the computer to do something, and you can't do that until you understand it first.

Henry



Well I appreciate your attempt at helping me... I'm quite good with algebra... if it was the math I was struggling with I would have gone to a math forum instead. But that's okay I guess I will just try somewhere else....
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

If you have had family problems, which we are sorry to hear about, you sh‍ould discuss the problem with the school office and you will most probably be granted an extension to your deadline.
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You asked for suggestions on how to start. We gave two suggestions. You rejected the first one. And seemed to be insulted by the second one. Perhaps it would be better to elaborate what you are having an issue with?

Henry
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Amber Ray wrote:Unfortunately i do not have time to worry about small details. As I said the assignment will already be late. I need to worry about the main portion now.


Well, unfortunately, one "small" detail can mean the difference between your program being correct and it not running at all.  There are small details that you can ignore without too much consequence (putting in comments, for example) and others that can significantly affect (a missing or out-of-place brace or semicolon, for example) how your program works. Other details are more subtle, like choosing good names or having proper structure and organization and breaking down a large task into smaller, inter-related tasks. These kinds of details affect how easy it is to manage your logic, complexity, and extensibility.

So, having an attitude of "I'm up against a deadline, I just need to get this main part done" is really not a good one, nor will it help you in the short term. There's a saying in the industry that you should keep in mind: "The only way to go fast is to go well."  Going well means paying attention to and taking care of the small details that can impact your progress.

Good luck.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:. . . So, having an attitude of "I'm up against a deadline, I just need to get this main part done" is really not a good one . . .

Least of all if your sad situation would justify an extension.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic