Lab 5

Interface vs. Abstract Class

Due Wednesday, March 29, 11:55pm. Submission through SVN.
Please submit your work in SVN directory< your username >/cs112/lab5



This lab is designed for you to practice using interface and inheritance, and to deepen your understanding of pros and cons of them. You will design and implement three different kinds of slot machines, once using interface SlotMachine and once using abstract class SlotMachine, in total 6 new classes. In your README, explain which is a better design, using either interface or inheritance(abstract class) in this lab.


Java hint

(int) Math.random()*n 
This code returns a random int value between 0..(n-1), inclusive on both ends.

What to submit

README, and all class files in slotinheritance package and slotinterface package.