Project 1: Babble (Single-Player Scrabble Clone)

Download Solution: Click to Download Solution
Solution File Name: BabbleGit0817.zip
Unzip Password: prestobear.com

Starter Project with Maven
Starter project file is with this folder, then import it into Eclipse.
This project is organized a little differently than a vanilla Eclipse project. It uses Maven for project configuration. Maven is an industry standard for project configuration that uses an XML file (pom.xml) to specify various development tasks, for example:
• building the project (compiling all *.java files into *.class files and putting those generated class files in the appropriate location)
• running unit tests
• packaging the compiled project into a JAR (Java ARchive) file (like the one used for the demo)
• generating Javadoc documentation
Maven has some other useful features, like:
• automatically downloading needed project dependencies (in our case, it is configured to download the Jaspell library so the project can spell-check played words)
• providing a standard directory layout for Java projects
The starter project already has everything customized for this project, so you shouldn’t need to modify pom.xml.
What you should be aware of is how Maven organizes files in your project. When you open the project in Eclipse, you should see two source folders that are probably unfamiliar to you:
• src/main/java : root directory of all production code *.java files
• src/test/java : root directory of all test code *.java files (JUnit tests)
Note that these are source folders, not Java packages. They are organized this way to give a clean separation between production code (src/main/java) and test code (src/test/java); the latter would not usually be included in a program distributed to a customer, so Maven splits it out. Underneath these folders are the actual Java packages:
o src/main/java
 edu.westga.cs.babble
 edu.westga.cs.babble.model
 edu.westga.cs.babble.controllers
 edu.westga.cs.babble.views
o src/test/java
 edu.westga.cs.babble.model
 edu.westga.cs.babble.controllers
Notice that the same package can appear under both src/main/java and src/test/java (for example, edu.westga.cs.babble.model). This is OK! It allows test code to be in the same logical package as the production code it tests, but to be physically separated in a different directory.
As you work through this project, be aware of where you put new classes you create. If the class is production code (i.e., anything other than a JUnit test), it should go in the appropriate package under src/main/java. If it is a JUnit test it should go under src/test/java.

Using Git and Bitbucket
For this project, you will create a remote repository on bitbucket.org and keep it in sync with the local Git repository containing your Eclipse project.
On your Eclipse Project:
1. Set up your project for version control as you learned in previous courses.
On Bitbucket.org:
1. If you have not done so already, create a Bitbucket student account using your westga.edu email account. You must have a student Bitbucket account (this gets us some freebies we may use later!)
2. Create a new repository on Bitbucket called Babble. Make sure you create it as a private project (there should be an option for this on the creation page).
3. On the Overview page there will be a drop-down with SSH on it — change the drop-down to say HTTPS — this will give your the HTTPS address of your Babble repository (for example, mine is https://lewisb42@bitbucket.org/lewisb42/babble.git). Copy that URL — we’ll use it in a minute. (DO NOT copy the SSH version of the address — it makes things much harder for us!)
4. In your Bitbucket repository, under Settings–>User and group access, add me (lewisb42) and make sure I have Read access. (This will allow me to download your work when I grade it. It will also send me an email notification that I have access.)
5. Using the repository URL you copied, configure your Eclipse project as described in the EGit Users Guide for Push Upstream. Notes:
1. Their example uses Github. Use your Bitbucket URL instead.
2. Ignore anything about SSH. Your Authentication will be your Bitbucket username and password.
The above setup only has to happen once for the project. From here on out you should periodically (at least once per programming session) push your work to Bitbucket. A push will take all commits you’ve made on your machine and upload them to Bitbucket for me to see. It also gives you a backup of your work in case your machine crashes. Commit often and push often!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.