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

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

  Objectivesbullto exercise the analysis design and

objectivesbullto exercise the analysis design and implementation activities of software development.bullto learn

  Write down a java program which reads a text file called

write a java program which reads a text file called mydata.txt containing the following numbers 23 18 78 64 28 39 92 93

  Questions1 design and implement an applet called circles

questions1. design and implement an applet called circles that draws 50 circles of random diameter in random locations.

  Littlest rebel starring shirley temple

Compare the novel Little Women by Louisa May Alcott and the film The Littlest Rebel starring Shirley Temple. How do these two intertwine or influence each other?

  Write a jsf application that reports the values

Write a JSF application that reports the values of the following system properties of the web server

  Create a constructor with three default parameters

How can you create a constructor with three default parameters two of type string and one double?

  Write a program to read a file and encode

Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name

  Calculate the area and circumference of a circle

Write a program to move and calculate the area and circumference of a circle. - Calculate function, which passes the radius by value, and get back the area (PI*radius*radius) and circumference (2*PI*radius) of the circle through reference

  Declare another television object called portable

Add to the comment header as indicated at the top of the program.

  Design a program that asks the user to enter a series of 20

Number Analysis Program: Design a program that asks the user to enter a series of 20 numbers

  Design a boolean function named isprime,

A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Des..

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