Build a small program

已悬赏 已发布的 Oct 9, 2015 货到付款
已悬赏 货到付款

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

项目ID: #8651441

关于项目

2个方案 远程项目 活跃的Oct 9, 2015

有2名威客正在参与此工作的竞标,均价$45/小时

asadrana91

A proposal has not yet been provided

$35 USD 在3天内
(39条评论)
5.5
vimalrajpara

A proposal has not yet been provided

$55 USD 在3天内
(1条评论)
0.6