Once again newbie hit the nail on the head. I had placed rf1.rectData(heightInput, widthInput); before actually taking the widthInput data from the user, so that's why it was coming up with funky...
Type: Posts; User: javadude
Once again newbie hit the nail on the head. I had placed rf1.rectData(heightInput, widthInput); before actually taking the widthInput data from the user, so that's why it was coming up with funky...
I'm going to post both classes since it makes more sense that way.
RectangleProgram:
import java.util.Scanner;
/**
* This is the main class of RectangleProgram. This class will take
*...
I wrote a program to take two values from the user that will determine perimeter and area of a rectangle. However, when I run the program, it is only adding the area input values together instead of...
Done and done!
Excellent! I fixed it with your help. Here's what I did (for anyone looking at this in the future):
I added cf1.setRadius(radiusInput); after the radiusInput key capture statement in the main...
Hey all,
I'm new to Java and am attempting to write my first program that will determine the circumference of a circle with a given radius. The user will enter only a 'double' number as there is...