CMSC 131 - Fall 2019 - Project #7


Suggested target for implementing Movie and Streaming and Website and then the SpoiledVegetablesDeck class (other than the two export methods export2Darray and export2Darraylist and the shuffle method) is by the end of office hours on Tuesday, December 3rd.

Exam #3 is on Friday, December 6th.

Suggested next methods: export2Darray and export2Darraylist

Suggested next method: shuffle

Graded: assignment submission due on Submit Server before 8pm on Monday, December 9th.

Type of project: Closed

Objective

This project will provide you with the opportunity to practice with interfaces as well as have some more practice with generic data structures, ArrayLists, and two-dimensional structures. The project is meant to be done in two phases; Phase 1 before the 3rd exam and Phase 2 probably waits until after the 3rd exam.


Overview

In this project you will implement some elements needed for a theoretical Android mobile game being developed by the people building the Spoiled Vegetables media critiquing site.

In Phase 1 you will build several classes that implement an interface called Critiqueable, and create a new one-dimensional generic data structure with certain rules for adding/removing things; that data structure will be able to hold any objects that extend the Critiqueable interface and will support a simple game of Solitaire.

In Phase 2 you will add to the one-dimensional structure's abilities by supporting the exporting of data from it and also add the ability to shuffle the deck.



In this project scenario there is no GUI built yet because another team is working on that based on the design specifications. When they complete their visual design they will make use of the classes you have built. The application architects have provided you with the JavaDocs for the classes, some initial acceptance tests (ExampleTests.java), and have also created a wider array of acceptance tests (the ones on the submit server).


Phase 1


Casting is something we discussed briefly in class and in the notes but that comes up in an interesting way here in this project. Please visit this summary of casting and interfaces to see why if you take something out of the ArrayList but need it to interact with a T reference, you might need to use casting. For example:
   T myValue = (T)arr.get(0);
would allow you to (for example) take a Movie object inside the list and return it, even though while it was in the list Java might have only known that it was something that implemented the Critiqueable interface.

Phase 2


Please note that in the card game there can be references to two different Critiqueable objects in the deck that have the same datatype and the same title and other data. If you end up using the version of remove in the ArrayList class that looks for an object rather than the one that goes to an index, this is potentially important to think about.

 

Notes and hints:


Restrictions


Project Submission

As always, you will submit your project from Eclipse by right-clicking the project folder and selecting "submit project". You may and should, of course, submit as you feel each part is working to get feedback from our tests, and are able to submit as many times as you want for public tests, and have the tokens which will regenerate 24 hours after their use for release tests. Remember, we only grade the submission that scores the highest on the automated tests

Note that you are strongly encouraged to read the project carefully and test your code with your own JUnit tests first.

 

Grading

Your grade will be computed using the Public and Release tests as listed on the submit server.





Web Accessibility