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
lab7 [2018/03/11 23:18] 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.
Line 57: Line 57:
 To receive feedback, submit your code using the submit command:\\ To receive feedback, submit your code using the submit command:\\
 <code> <code>
-submit 4315 lab7 <name of file>.java+submit 4315 lab7 <name of class>.java
 </code> </code>
  
lab7.1520810307.txt.gz · Last modified: 2018/03/11 23:18 by franck

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki