Assignment 3

Be sure to type up your answers so you can submit them electronically on the BlackBoard Connect system. You may complete this assignment individually. Make sure all your files have your full name and student number on it.

Type up your answers using Eclipse. The file format of the Java program you are to submit must be .java.

This assignment is marked out of 63 points.

Due Date

March 29, 2014, 11:59AM (just before noon).

24 Hour Silence Policy

Due to the large class size and the potential volume of questions, we are implementing a 24-hour silence policy. This means that any questions posted on the discussion forum in the 24 hours immediately preceding the assignment deadline may not get answered in time. This does not mean that we will stop answering questions the moment the day before the deadline arrives, it just means that we cannot promise all the questions will be answered in time, due to our prior engagements, such as other classes and meetings we have.

For this reason, please be sure to attempt the assignment early, and try to complete it as if it were due two days prior to the real deadline.

In any case, we will try to answer all the questions that show up on the discussion forum. Note that questions sent to emails will not be answered, as we want all course related material to be viewed for everyone's benefit.

What You Are Given

There are 2 questions in this assignment. The first question is to practice queues and stacks, and the second is to practice sorting and search. These questions will also include a review of several core concepts of this course.

Question 1 [23 points]

For this question, you are going to build a simple word processor that takes input from the user (words), "remembers" them up, monitors for user command for undoing certain words, and monitors for user command for printing the stored words into a file. For the time being, we want to keep the program simple by taking the user out of the problem, so that your task is to build the core functionality of the word processor for this question only. Doing this will also facilitate testing. In the very last part, you can add the user back into the problem and make sure the rest of your code still works.

You are given an interface in WordProcessorInterface.java that specifies the methods needed for a basic word processor. Make sure you read the comments so you implement the methods according to the specifications.

Be sure to submit the output from your regular tests in WPOutput.txt and the file output in WP-FileOutput.txt for this question as well.

Question 2 [40 points]

In this question, you will create a tournament of animals that will battle in an arena, similar to Pokemon. There will be a total of 8 competitors in this single-elimination tournament. This question will get you to practice inheritance and polymorphism, as well as sorting and search. (Note: We do not condone the harming of animals.)

Specifically, complete the following parts:

What to Submit

Be sure to comment all the methods and attributes for clarity. For this assignment, submit the following: