aspose file tools*
The moose likes Beginning Java and the fly likes Help with Methods please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with Methods please" Watch "Help with Methods please" New topic
Author

Help with Methods please

Rob Walter
Greenhorn

Joined: Mar 20, 2004
Posts: 2
This post is a repost, I deleated the other one because it didnt make much sense. What I need help on is a third Method, ive already created, "computePayroll". this method wont take any parameters, I need to create a loop that will loop for times with each iteration representing a paricular week. Before the loop starts I need to have the method prompt the user for the seniorityBonus. Then for each iteration of the loop, the method needs to prompt the user for the weekly sales. Inside the loop I need to make calls to "computeSeniorityBonus" and "computeCommission" to generate the final salery for the week. Then I have to have the method total up the sales persons four weeks to have a monthly salary. I then need to return this value as a duoble to the main. Now I had a hard time getting my other two methods working, but thanks to you all here I was able to get it. I just dont know where to start with this method.
James Chegwidden
Author
Ranch Hand

Joined: Oct 06, 2002
Posts: 201
1. You have the solution in front of you. To me the problem is not using methods but organizing your thoughts out first on paper. Psedocode first, then program.
2. Also, this is obviously a homework problem (i.e. using MyInput, project4, etc.) why don't you use your book to help you?
3. What does your instructor say?
Just my thoughts


Author and Instructor, my book
Rob Walter
Greenhorn

Joined: Mar 20, 2004
Posts: 2
yes it is homework and my teacher has asked us to get help from others. I'm not wanting someone to right code for me I just would like an example or help. My first question is would I have to create four different variables for week1, week2, week3, & week4, in my method so I can compute them?
 
wood burning stoves
 
subject: Help with Methods please