CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Question

  1. #1
    Join Date
    Mar 2009
    Posts
    14

    Exclamation 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;
    }

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    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 &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Mar 2009
    Posts
    14

    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
  •  





Click Here to Expand Forum to Full Width

Featured