• Post Reply Bookmark Topic Watch Topic
  • New Topic

Homework help - Commission calcuator  RSS feed

 
Petrisor Cristian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really need some help with a homework and as I don't have any experience in programming and getting to do programs from the second course I really don't have any ideea how to make this program in eclipse :
     – A company provides commission to its workers on the basis of sale
     SALE  COMMISSION
     >=10000  10%
     >=5000  5%
     >=2000  2%
     <2000  “ no commission”
Please try to help me because I need it for tomorrow but now I go to work from 6 pm  until 6 am (tomorrow) and at 5pm I will go to the course (where I will have to give my homework). So I need a lot of help fast so from 2 to 4 pm I can write it after I take a nap and a shower plus breakfest.

 
Tim Cooke
Marshal
Posts: 4044
239
Clojure IntelliJ IDE Java
  • Likes 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Petrisor, welcome to the Ranch!

If you're looking for someone to do your homework for you then unfortunately for you you're in the wrong place. Nobody is going to do that for you. If you're looking for help to do it yourself then you're in luck. There's plenty of help here for that.

What i suggest you do is kick off the conversation by showing us what you've got so far and explain to us the specific problem you're facing right now. Be mindful that everybody here are volunteers so things like "I need a lot of help fast" is meaningless as the urgency is yours and yours alone. Pushing for answers quickly will most likely be counterproductive and put people off helping you as it's no longer fun. So, take it easy, present your problems simply and clearly, take notice of the assistance being offered, and work through them bit by bit. You may just get there.
 
Campbell Ritchie
Marshal
Posts: 56540
172
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again
I suggest you start by writing down how you would do that exercise without a computer. Then turn your procedure into simple steps, which will be easy enough to turn into code. You shou‍ld be able to do the writing in about ten minutes; that will leave lots of time for the coding.
 
Petrisor Cristian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To start with the begining, I have been at 2 meetings for a course of beginners in java programming.In the first meeting we were informed about the purpouse and the benefits of java and we installed jdk jre and eclipse.
In the second we were given 3 examples of simple programs and this homework, without any explanation for Scanner, Flat and so on.
So I think I will need Scanner, Flat too and maybe something like another class for commisions?!
 
Campbell Ritchie
Marshal
Posts: 56540
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. What is Flat? Which classes you use depends on how you are designing your application. It is your decision which classes you use, not ours.

More to the point: what did your planning create? What sort of code have you written so far? What were the examples of programs?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Petrisor Cristian wrote:
So I think I will need Scanner, Flat too and maybe something like another class for commisions?!


The Scanner class being referred to is likely the one that is part of the core Java library.

You can see the documentation here... https://docs.oracle.com/javase/8/docs/api/java/util/Scanner.html

And there is the Oracle tutorial here... https://docs.oracle.com/javase/tutorial/essential/io/scanning.html

Hopefully, that should give you some background on it, which should help you understand your class notes a bit more.


As for the other classes, it is likely something that was written by your instructor. Or something that is defined by your instructor on how to do the assignment. If either case is true, then I recommend that you go back to your notes.... that should be a good next step.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!