Build a small program

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.

Taidot: Java

Näytä lisää: tile by design, build job board php, small intall job bidding web, build job posting website, small wordpress job, build job portal site, need someone write program small business, build job portal, small flash job, build job board joomla, build job site using cakephp

Tietoa työnantajasta:
( 0 arvostelua ) United States

Projektin tunnus: #8651441

2 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


A proposal has not yet been provided

$35 USD 3 päivässä
(39 arvostelua)

A proposal has not yet been provided

$55 USD 3 päivässä
(1 arvostelu)