This assignment can be done either individually or as a team of at most two students. The submission date is as specified in the Course Profile and the submission method will be communicated during semester.

The idea of the Game Cross Numbers is to arrive at the figures given in the bottom row and the right-most column of the table by following the arithmetic operators in the order they are given (that is left to right and top to bottom). Use only numbers in the range specified below the table to complete the blank squares. see image.

Part 1.

Implement the game with a text based interface and the arithmetic operators + (add), - (subtract) and x (multiply). Your implementation must include:

1. User must logon with a username and password to play.

2. User can restart a game that they were playing previously.

3. User can generate a new game of dimension n by n (in the example above n = 6) and also specify the number range allowed. The arithmetic operators must vary from game to game.

4. As an option, entry of a number that would make the solution so far entered invalid is flagged immediately.

5. User can ask for help by having a valid next number automatically inserted into the table.

6. User will get a score that will depend on the time taken, the difficulty of the game, whether they had selected the immediate notification of an invalid number and the number of times help was received.

7. User scores can be displayed along with the dimension of the associated game, time taken and the difficulty of the game.

Part 2.

Inheriting from the classes you generated for Part 1, generate a version of the game specifically for computer programmers by adding the following features:

1. Add the arithmetic operators / (integer divide) and % (modulus).

2. Add the binary operators & (bitwise and), | (bitwise or), ! (bitwise not) and ^ (bitwise exclusive or).

3. Add the feature that the result generated from each operator can only be in the range 0..N (e.g. when a calculation is done, at each step % N is performed on the answer before the next step is performed).

4. Add an option for the operators to be performed in accordance with the Java precedence.

5. Add the feature that different number systems can be used (e.g. binary, octal, hex).

Part 3.

Design and implement a GUI interface to your game so that the use of the keyboard is minimised.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.