Thread: help plz
View Single Post
 
help plz
Reply
Posted 2004-05-19, 06:14 AM
plz help i have to design a java interface called priority that has two methods setPriority and getPriority. so i have to design and implement a class called task that implements they Priority interface. and create a driver class to use some task objects.
this what i have so far

this my priority

public interface priority
{
public void setPriority (int priority)
public int getPriorty ();
}

this my task

public class task implements priority{
private string description;
private in importance;
task (string Name, int p) {
description = name;
imprtance = p;
public void setPriority (int priority){
importance = priority;
}
public int getPriority ();
return importance
}

this my task driver

public static void main (string [] args){
task, t1,t2,t3;
int priority1, priority2, priority3;
string description1, description2, description3;
system.out.println ("enter a description");
description= keyboard.readstring();
t1= new task priority1;
t2= new task priority2;
t3= new task priority3;

i got stuck in they task driver can someone tell me what do i add to make it work or tell me if i made any mistake plz help me
Old
Profile PM WWW Search
osmoses-jones is neither ape nor machine; has so far settled for the in-betweenosmoses-jones is neither ape nor machine; has so far settled for the in-between
 
osmoses-jones