Results 1 to 3 of 3
  1. #1
    buston01 is offline Member
    Join Date
    Jan 2010
    Posts
    9
    Rep Power
    0

    Exclamation CMD Package Compiling

    Please i am trying to compile these program in same package in which i put them in a folder called Buston:
    ...............................................
    package Buston;

    public interface Calculate{

    int compute();
    }
    ............................................
    This one compile fine but the one below im getting an error "cannot find symbol"

    *****************************
    package Buston;

    public class Worker implements Calculate{
    private int numLevel,present;
    private String name;
    public Worker(int level, int present, String name){

    this.numLevel = levelValidator(level);
    this.present = presentValidator(present);
    this.name = name;
    }
    public int levelValidator(int level)
    {
    int amtLevel = 0;
    switch(level)
    {
    case 1:
    amtLevel = 500;
    break;
    case 2:
    amtLevel = 1000;
    break;
    case 3:
    amtLevel = 1500;
    break;
    case 4:
    amtLevel = 2000;
    break;
    case 5:
    amtLevel = 2500;
    break;
    case 6:
    amtLevel = 3000;
    break;
    case 7:
    amtLevel = 3500;
    break;
    case 8:
    amtLevel = 4000;
    break;
    case 9:
    amtLevel = 4500;
    break;
    case 10:
    amtLevel = 5000;
    break;
    default:
    amtLevel = 0;
    }
    return amtLevel;
    }
    public int presentValidator(int presenty)
    {
    if ((presenty < 0 || presenty > 31)){

    presenty = 0;
    }
    return presenty;
    }
    public int compute()
    {
    int total = numLevel*present;

    return total;
    }
    }

    ***************************
    Please if you can help me on this i will appreciate it

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    It might help if you copy and post the command you are using to compile and the output that results.

  3. #3
    buston01 is offline Member
    Join Date
    Jan 2010
    Posts
    9
    Rep Power
    0

    Default Solved...Thanks

    thanks i used javac *java to compile it and it worked

Similar Threads

  1. compiling a package user created
    By svaidya in forum New To Java
    Replies: 8
    Last Post: 12-14-2009, 09:54 PM
  2. Package Compiling
    By kaperks in forum Advanced Java
    Replies: 1
    Last Post: 02-23-2009, 03:56 PM
  3. [SOLVED] Compiling Package Class
    By nwboy74 in forum New To Java
    Replies: 3
    Last Post: 11-15-2008, 12:19 AM
  4. Compiling a class in a package from cmd
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-17-2007, 11:27 AM
  5. Importing / compiling and running with .jar package
    By splinter64uk in forum New To Java
    Replies: 1
    Last Post: 12-05-2007, 03:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •