Grammers, the Game
September 25th, 2012
Bizarre Entertainment, a company well known for making the strangest board games, has come up with the newest fad for the party industry. Bizarre Entertainment has come up with "Grammers", a game about words and improper grammar. Grammers is a game which is no fun unless the players are in a non-sober state, the rules are quirky and the objective of the game is to assert both lexical and hastening dominance. However, Bizarre Entertainment isn't interested in launching a mass prototype making for the board game, and has decided to have players play test the game in a virtual environment. Thus, once again, they must rely on you to help them out.
You must provide BizarreEntertainment with two classes, GrammerStack and GrammerQueue. However, they would like you to do so in a very specific way, and thus provide you with some assistance files:
You should look over these for they include some details on what each thing must do or can do.
GrammerStack A GrammerStack is unlike a regular stack. First of all, it only allows Strings to be stacked onto each other. It only allows a certain amount of Strings at a given point, and will cause a FillException if the GrammerStack is at full capacity and someone attempts to stack an extra String on top of it.
public GrammerStack(String structureName, int limit)
public class GrammerStack extends GrammerStructure implements StringStack
GrammerQueue Unlike a GrammerStack, a GrammerQueue can be filled until there is no physical space in the universe to place more Strings in any given GrammerQueue. As well as the GrammerStack, the GrammerQueue only allows Strings to be placed within it. It will also cause EmptyExceptions when given situations arise.
public GrammerQueue(String structureName)
public class GrammerQueue extends GrammerStructure implements StringQueue
You can only use a String as your underlying structure.
Sometimes, we must reinvent the wheel in order to learn something. This lab was designed to get you to learn about Stacks and Queues, these have already been implemented in Java for you, however you cannot use anything previously implemented. If you have an underlying Stack
Look at the provided code, a good example of how to comment things. When implementing an interface, you ONLY have to comment the method once, when declaring it within the interface. Implementing classes of the interface should use the @Override notation for the method, indicating that the method is overriden and the doc for it comes from somewhere else.
Stay posted, we are slowly (slower than a turtle) transitioning into a web-based submission system in which (hopefully) your files will be graded on site out of the requirements and you can see your score in real time. Hopefully, sometime in the future, you'll no longer have to submit files via email.
Bizarre Entertainment does not hold itself responsible for any damage occurred whilst playing "Grammers" in real life