Search:

Type: Posts; User: kenster421

Search: Search took 0.07 seconds.

  1. Replies
    8
    Views
    1,772

    Re: Help with a java assignment?

    You don't have a return statement.


    Change to:
    public static int aSalary(int sales) {
    if (sales <= 0){
    return 0;
    } else {
    return (int)((double)(sales) * 0.09 + 200); // java does not...
  2. Replies
    8
    Views
    1,772

    Re: Help with a java assignment?

    Problems:
    0. When you post code, please use the "CODE" tags.

    1. You make a reference to a variable outside of your current scope.


    2. Your class does not contain a constructor, which is okay...
Results 1 to 2 of 2