diff --git a/Lab 2 Questions.md b/Lab 2 Questions.md new file mode 100644 index 0000000..cac09f7 --- /dev/null +++ b/Lab 2 Questions.md @@ -0,0 +1,14 @@ +*Question 1*: ````cutoff```` if not a praameter to ````playturn```` because it is an instance variable. + +*Question 2*: ````Scoresheet s = new Scoresheet```` assigns a new scoresheet to s. It then prints out the average number of turns which in this case it 0.0. + +*Question 3*: You could move ````numBusts```` to the playTurn class under the line ````score=0````. + +*Question 4*: The problem is with the ````upValue```` always being 1. Line 25 in Die.jaja needs to be fixed. + +*Question 5*: I changed `````(int Math.random() * 6) + 1```` to ````(int) (Math.random * 6) + 1```` to allow `math.random` to get a value other than 1. + +*Question 6*: 10 = 5.55 + 15 = 12.625 + 20 = 8.5 + 25 = 11.333 \ No newline at end of file diff --git a/src/Answersrr.md b/src/Answersrr.md new file mode 100644 index 0000000..c2a0563 --- /dev/null +++ b/src/Answersrr.md @@ -0,0 +1,23 @@ +**Question 1:** + +1) Not starting the array off at 0. + +2) Using an interger and double type in the same array. + +3) Having too many values in the array. + + +**Question 2:** + +1) "A new instance of a class." - A n empty new array will be created with a refernce to `scoreboard`. + +2) "An instance with a single mutation." - 1 item will be added to the array for `score`. + +3) "An instance with multiple mutations." - Mutiple items will be added to the array. + + +**Question 3:** + +A new instance of a class would be a range [0,0). There are no mutators. + +