Build a small program

Vergeben Veröffentlicht Oct 9, 2015 Bezahlt bei Lieferung
Vergeben Bezahlt bei Lieferung

he objective of this lab assignment is for you to think about the design decisions that go into defining a class.

Assignment: Imagine that you want to make a memory game. You generate two of each kind of tile and then mix them up and lay them out face down. The player flips one over and then another over. If they match, the tiles are removed. If not, they are turned over again and the player flips over two more tiles.

Your objective today is not to implement this memory game. It is instead to define the Tile class that will be used in this memory game. As a starting point, you should write down (on paper) the different states the tile can be in and what is associated with each state. You should also write down what behaviors a tile should have.

After you have thought about the characteristics and behavior of the tile, you should then take that list and start defining the class by defining what data members, what constructor(s) and what methods it should have. Again, you should do this on paper.

Once you have come up with a draft of the class, you should enter it into Eclipse. Where in previous labs you were implementing methods that had been specified, now it is your job to write the specifications for each constructor and method. Be sure to do so using javadoc comments.

Only after you have designed the class should you start implementing constructors and methods. Be sure to create a driver class that instantiates one or more instances and then has methods to test each method you have implemented.

As you implement the methods, you may realize that you need to add methods or make changes. You may decide that it is more efficient to have data members to hold information than to provide a method that recreates something every time it is invoked. These are precisely the things you should be considering as you make design decisions.

Java

Projekt-ID: #8651441

Über das Projekt

2 Vorschläge Remote Projekt Aktiv Oct 9, 2015

2 Freelancer bieten im Durchschnitt $45 für diesen Job

asadrana91

A proposal has not yet been provided

$35 USD in 3 Tagen
(39 Bewertungen)
5.5
vimalrajpara

A proposal has not yet been provided

$55 USD in 3 Tagen
(1 Bewertung)
0.6