WCCCEDU / CPT-163-27-F2015-Assignment-7-Array-DiceTower

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Week 7 (Arrays) Assignment

This week we are going to utilize arrays but also learn how to build software with an existing set of requirements.

Those requirements come in the form of tests that I have provided in the driver. They will exerciese your classes and try to test that you have built a reliable implementation of a die(random number generator) and a dice tower that can aggregate value of those dice when rolled together.

  • A Die class that will implement a generic random number generator that is constructed with a specified number of sides.

    • Die will have a field for the number of sides assigned by the constructor only.
    • Die will have a field for its value generated by a random number.
    • Die will have a public roll() method that updates the value field.
    • Die will have a public accessor to get the value field.
  • A DiceTower class which accepts a collection of dice on construction

    • DiceTower has a public dropDice() method which will roll the dice per the number of panels are in the dice tower
    • DiceTower has a public accessor to get the sum of the die results after the roll is finished.
  • The Driver has two tests.

    • One that verifies your ranges for 1000 rolls of a 6 sided die.
    • One that verifies the range of values for 2 6 sided dice passed through the dice tower 1000 times.
Setup for Github
  • Fork the repo to your personal account
  • Clone your fork to your local computer
    • From Github Desktop
      • click the + on the top left
      • select clone then search for CPT-163-27-F2015-Assignment-7-Array-DiceTower use the one under the section with your github name
    • From Command Line
      • Copy the https link from your fork on github.com (its below the settings button on the right hand side of the page)
      • run git clone <copied url> (this will create a folder the same name as the repo in the directory you ran this command)
  • Create a branch on your fork of the Assignment-7 Repo using the format /<feature_description>
    • From Github Desktop
      • Click the Add a Branch button (It should be the button next to the dropdown that says master)
      • Make sure you create your branch from master
    • From Command Line
      • run git checkout -b <branch_name>
  • In Netbeans create a new project and set the Project Directory to the folder that was created when you cloned your fork.
  • Write Code!
  • Create a commit
    • From Github Desktop
      • Select your fork and fill-in the commit summary
      • Click Sync
    • From Command Line
      • run git add .
      • run git commit -m "<your commit message>"
      • run git push origin <your_branch_name>
  • Go to Github.com and open your PR by clicking on Compare and Open Pull Request

About


Languages

Language:Java 100.0%