Results 1 to 3 of 3
Thread: CMD Package Compiling
- 12-06-2010, 06:57 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 9
- Rep Power
- 0
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
- 12-06-2010, 09:32 PM #2
Moderator
- Join Date
- Feb 2009
- Location
- New Zealand
- Posts
- 4,547
- Rep Power
- 11
It might help if you copy and post the command you are using to compile and the output that results.
- 12-10-2010, 07:04 AM #3
Member
- Join Date
- Jan 2010
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
compiling a package user created
By svaidya in forum New To JavaReplies: 8Last Post: 12-14-2009, 08:54 PM -
Package Compiling
By kaperks in forum Advanced JavaReplies: 1Last Post: 02-23-2009, 02:56 PM -
[SOLVED] Compiling Package Class
By nwboy74 in forum New To JavaReplies: 3Last Post: 11-14-2008, 11:19 PM -
Compiling a class in a package from cmd
By Java Tip in forum Java TipReplies: 0Last Post: 12-17-2007, 10:27 AM -
Importing / compiling and running with .jar package
By splinter64uk in forum New To JavaReplies: 1Last Post: 12-05-2007, 02:47 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks