Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Rebecca Berry

+ Follow
since Jun 29, 2016
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rebecca Berry

I went ahead and put a System.out.println(s); in. Now when I run the program this is what I get when I click on the spaces. (I clicked top row to bottom row, left to right)

5 years ago
Hello again!  I am having an issue with my 2 Player Tic Tac Toe Game. When I run it the board comes up like it should, however, nothing happens when I click on a space to make a move. When I click on the space it should mark it with a 'X' and then state it is O's turn and so on. What am I missing?  Thanks as always for the pointers.

5 years ago
Ok I think I fixed it.  All seems to be compiling the way it should be.  Thanks again everyone for the pointers!  When you are essentially self teaching yourself friendly help is always greatly appreciated.  Until my next is my working code.

Zero Exceptions Class
5 years ago
Greetings everyone. So I have written a program that is supposed to figure the ratio of two numbers. It is supposed to warn if the 2nd number is zero and also catch if the user inputs something other than a number.  Everything appears to be working except the Catch for the InputMismatchException.  Only a few weeks into Java so still pretty much a noob. Any pointers on how to fix this or where my code is incorrect would be appreciated.  Side note: I know my code is a little bit of a mess at the moment. I usually go thru at the end and fix the formatting. Thanks again for any pointers!

My code:

Current output when attempting to enter something other than a number:
5 years ago
Hi again all!  So I have created a program to delete the repeats in an array.  It seems to be working with one exception.  I need the results to have a comma separating all the letters. So instead of the results displaying as a,bc I need them to display as a,b,c. Any advise on how to solve this issue? As always thanks for the input.
Here is my code:
import java.util.Arrays;

And here is the output:

5 years ago
I did get it to work the way I needed it too.  Thanks again for the help.  Here is the final code:
5 years ago
I have been referencing the class book for most of this code.  So that is why the static methods. It is just what the book shows.  I have never used Java before and this is the 5th week of my course. So everything is still pretty new to me. Thanks for the help!  It is appreciated.
5 years ago
Hey all!  So I have written a basic tic-tac-toe game and all seems to be well except the board display.  It should display as follows:
1 2 3
4 5 6
7 8 9
But is coming out 123456789.
For the life of me I can not figure out what I did wrong. Any hints or pointers would be appreciated greatly. Thanks!
Here is my code:

And here is the outcome when I run it:
5 years ago
Hello again all!  I am getting an error message and my code will not compile. I can not seem to figure out why. So any pointers in the right direction would be appreciated. The object of this program is to request user input, then return the input along with medication dosages based on the user's input. As I have mentioned before I am very new to Java. I am having some issues with the Java class I am in since there is really no instructor guidance. I  was told to purchase a book and given assignments that are not corresponding to the information in the book as we go. So I apologize for the funky code and thanks in advance for the pointers.
The error message that is showing up when I attempt to run my code is:

Exception in thread "main" java.lang.UnsupportedOperationException: Not supported yet.
at pet.Pet.<init>(
at pet.PetDemo.main(
C:\Users\Violettwilight\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)

And my code is as follows ( I should mention a large chunk of this code has been copied from source code from the course book-per professors instructions. I just had to make a few tweeks):

5 years ago
Hi again all! So I have to write a program that randomly rolls a set of dice 10,000 times.  If the roll produces a total of 7 or 11 it is considered a win. Any other number (2, 3, 4, 5, 6, 8, 9, 10, and 12) is considered a loss. The output of the program should state the total wins and total losses as well as a probability. The problem I am having is that my code appears to be producing wins only.  Here is my code so far:

5 years ago
Thanks for the help all! I am still having a little trouble however.  It is indeed >0.01. And according to the homework instructions the out put should appear exactly as I listed it in my initial question.  The number 15 is just used as an example when running.  When I run the program I currently have, and use the number 15 when doing so, it is only printing 1 current guess.  Here is an update of my code:

5 years ago
Hi everyone! New to Java and have a homework question. I have created a program for square root and it appears to be working correctly. My professor has now requested the program keep looping until: "((old guess-guess)/old guess) is >0.01.  He would like the output to look as follows(using the number 15 as an example):
This program estimates square roots:
Enter an integer to estimate the square root of:
Current guess: 4.75
Current guess: 3.9539473684210527
Current guess: 3.8738122865399776
Current guess 3.872983434898095

The estimated square root of 15 is:  3.87

Any help on how to create this output would be great.   Thanks in advance!
Here is my code thus far:

5 years ago