User Tools

Site Tools


lab7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab7 [2018/03/11 22:20] francklab7 [2018/03/11 23:19] (current) franck
Line 51: Line 51:
  
 Implement the following classes. Implement the following classes.
-  * The class Pusher.  Each Pusher object is a Thread that pushes the integers 0, 1, ..., 9 onto a stack.  The stack is provided as an argument to the constructor of the Pusher class.  The jar file [[:pop.jar|pop.jar]] contains the class Popper.  Each Popper object is a Thread that pops ten integers from a stack.  The stack is provided as an argument to the constructor of the Popper class.+  * The class Pusher.  Each Pusher object is a Thread that pushes the integers 0, 1, ..., 9 onto a stack.  The stack is provided as an argument to the constructor of the Pusher class.  The jar file {{:pop.jar|pop.jar}} contains the class Popper.  Each Popper object is a Thread that pops ten integers from a stack.  The stack is provided as an argument to the constructor of the Popper class.
   * The class Stack.  This class is based on the above skeleton and allows Threads to concurrently call the push and pop methods on the stack.   * The class Stack.  This class is based on the above skeleton and allows Threads to concurrently call the push and pop methods on the stack.
   * The class Main.  This class only contains a main method.  In the main method, a number of Popper and Pusher objects are created (for example, 10 Poppers and 5 Pushers) and all these Threads are run concurrently.   * The class Main.  This class only contains a main method.  In the main method, a number of Popper and Pusher objects are created (for example, 10 Poppers and 5 Pushers) and all these Threads are run concurrently.
  
 To receive feedback, submit your code using the submit command:\\ To receive feedback, submit your code using the submit command:\\
-submit 4315 lab7 .java+<code> 
 +submit 4315 lab7 <name of class>.java 
 +</code>
  
  
lab7.1520806806.txt.gz · Last modified: 2018/03/11 22:20 by franck

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki