-
March 7th, 2009, 03:10 PM
#1
Question
Hi guys
This is what the problem says : A large company pays its salwspeople on a commison basis. The salesperson recieve $200 per week plus 9% of their gross sales for that week.
I have to develop a program that inputs one salespersons items sold for last week and calculates and displays that salespersons earnings. There is no limit to the number of items that can be sold. My teacher has already giving me the input and output values. I can't figure out the equation for the products sold. This is what I have come up with so far. Any help would be appreciated but I need to keep it simple because I am just learning this.
import java.util.Scanner; //program uses class Scanner
public class Salesperson
{
public static void main(String[]args);
Scanner scanner = new Scanner(System.in);
{
//Create product object
product sold = new product
(int number= 2;
while(num <=8)
}
public void setProductSold (String sold)
{ProductSold= sold;
}
public String getProductSold()
{return ProductSold;
}
public void setProductPrice (String price)
{ProductPrice= price;
}
public String getProductPrice()
{return ProductPrice;
}
System.out.println("Enter number of products sold");
int number; = product*0.09 + 200;
}
-
March 7th, 2009, 05:01 PM
#2
Re: Question
So what exactly are you having problems with?
If you understand what you're doing, you're not learning anything...
Anonymous
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
-
March 9th, 2009, 03:32 PM
#3
Re: Question
Actually My teacher ending up helping me with this code. thanks everyone for looking @ it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|