Design and implement a java version of the game memory

Assignment Help JAVA Programming
Reference no: EM13854351

Overview

The purpose of this assignment is to use the GUI components of Java and layouts to design and implement an interface and

functionality for a Memory game. The objectives are:

• To develop from scratch a MemoryBoard class that simulates a grid used in the memory game

• To gain additional practice using arrays

• To gain additional practice using AWT components and layouts

Design

Design and implement a Java version of the game Memory. In this game, the player is presented with a two-dimensional grid of boxes that contain pairs of matching images or strings (you may use either). The object of the game is to find the matching pairs. When you click on a box, its contents are revealed. You then click on another box. If its contents match the first one, the contents remain visible. If not, the boxes are "closed" or covered again.

The player should be able to play multiple games without getting the same arrangement each time (in other words, the items behind the box should change or move each time the game begins).

The Design

Create a separate package in your workspace called view, and within that package, create the appropriate classes that you will need to design the interface (i.e., the MemoryBoard, buttons that can be clicked on the grid, images, etc.).

The Controller

Create a separate package in your workspace called controller. In this package, create the necessary class(es) that would be needed to keep track of the state of the buttons in the system (whether they have been clicked to be visible, or clicked to be not-visible).

The controller package should also contain all of the ActionListener implementations that need to access the grid instance and any data within it.

GUI Structure

You are free to use any GUI design you wish, but it should be at the minimum a two-dimensional grid, with boxes that are clickable.

Below is a mock-up example of the type of GUI we expect you to create. You are expected to use some of the GUI components discussed in this unit to design this interface, including JPanels, JLabels, JFrames,

Hints and Tips

Remember, keep any ActionListener implementations in the controller package. We encourage you to be creative with any additional methods/members you will want to add to these implementations. After all, some of the ActionListeners somehow need to have access to the Grid instance. You can do this however you want, as long as it is in good form and it make sense. Note: You may want to create sequence diagrams of how your various Swing components will change based on user behavior and model behavior before coding them up. A good approach to assignments like this is to create the GUI first. Then, add functionality to the GUI components and the corresponding model classes one at a time until they all work correctly.

What to Turn In

As with all previous programming assignments, create a .zip archive of your project workspace and upload to Moodle by the deadline.
Extra Credit (worth 15 additional points)

Display a Player's Score, which starts at 0 and increases each time the player finds a match. A High Score should also be maintained, that maintains as long as a player hasn't beaten it. Once a player does beat it, the high score should be changed to the new score.

Reference no: EM13854351

Questions Cloud

What are your grounds for concluding this : Based on this scorecard, which areas of the organization seem to be doing well, and which ones are most in need of improvement? What are your grounds for concluding this
How clearly does the title indicate the subject : Write a one-paragraph evaluation of each of the following titles. How clearly does the title indicate the subject and purpose of the document? In what ways does it fall short of incorporating this chapter's advice about titles? On the basis of your a..
Essay about a failure mode and effects analysis : essay about a failure mode and effects analysis
Formulate the linear programming problem to minimize cost : Formulate this as a linear programming problem to minimize cost. How many units of each type should be produced each month? What is the total cost of thissolution?
Design and implement a java version of the game memory : Design and implement a Java version of the game Memory
Describe three different grouping configurations : Select a content subject and a topic that you are teaching to English language learners. List and describe three different grouping configurations that could be used for teaching and learning this new concept
Series-parallel circuits : Create a personal checklist (below) to demonstratemethods of simplification of series-parallel circuits.  Your checklist should contain the following:
Would you prefer to be the franchisee or franchiser : Search the internet for a franchise business model. Summarize the model for the class. In the case you found, would you prefer to be the franchisee or franchiser? Why
Benefits to having different types of computers on a network : Do you think there are any benefits to having different types of computers on a network? Why or why not? Please explain

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd