Java help

  • thomas_sum
  • Beginner
  • Beginner
  • thomas_sum
  • Posts: 44

Post 3+ Months Ago

Quote:
public void run () {
//delivery service makes 8 journeys
for (int) = 0;j < 8;j++) }
system.out.printIn ("\t\tdervivery leaves Cafe");
//derlivery travels 30 units of distance from Cafe to Study Center
travel (30,1);
System.out.printIn ("\t\tderviveryarrives at Student Centre");
stop (10); // Delivery waits for 10 time units
//delivery travels 30 units of distance from Study Centre to Cafe travel (30,1);
system.out.printIn ("\t\tdervivery leaves Cafe");
stop (10); //Delivery waits at Cafe for 10 time units

}
}


How can i implement of Waiting and Delivery in such the way that access to the "buffer" studentsWaiting is performed under mutual exclusion and with the condition synchronization describe above? I'm stuck at here with the question mention.... Hope someone can help me

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.