Hi everyone,
I need some help with my homework. I checked online and found loads of results but didnt understand much.
I need to submit hw by tomm nyt .. 27hrs from now. Please help me if you can plz ..
Here is my code snippet
public static void main(String[] args)
{
// TODO Auto-generated method stub
initilize();
System.out.println("Barbershop Opened with "+config.getNoofbarbers()+" barbers.\nWaiting for Customers ... "); // Starting Barber Shop
System.out.println("Enter the no of minutes :");
config.setNoofminutes(Integer.parseInt(input.nextLine()));
Customer_Enters thread_ce = new Customer_Enters(config);
Barber_Working thread_bw1 = new Barber_Working(config, 0);
Barber_Working thread_bw2 = new Barber_Working(config, 1);
Barber_Working thread_bw3 = new Barber_Working(config, 2);
new Thread(thread_ce).start();
new Thread(thread_bw1).start();
new Thread(thread_bw2).start();
new Thread(thread_bw3).start();
}
I basically have 4 threads running.
Now i need to make sure in the parent class that they run only for a unser-provided specific amount of time.
I need to put some sort of timer i guess .. I have never done it .. any help will be highly appretiated.:))
Thanks a lott in advance ...
If you need any more information .. plz lemme know .. i ll be more dan happy to help .. :)
Thanks agn...