Sorry I am not getting you here. Did you find an error in my code? I have no idea what I should change in my code!
Type: Posts; User: adnan.alvee
Sorry I am not getting you here. Did you find an error in my code? I have no idea what I should change in my code!
Got it, its the same value 1.0. Tried with different initial values in height and width, findarea is good but my test class is not giving me the values I assigned in that class; all what I am getting...
Tried this code System.out.println(findArea); error comes up saying "Cannot find symbol"
Okay, this is my rectangle.java file code,
public class Rectangle {
private double width = 1;
private double height = 1;
private static String color = "white";
public...
Thanks, I know. Will change that.
Got hold of the error, I was creating two classes in 1 file, separated the Test class. But I cannot dsiplay color and area. Output is 1.0 and 1.0 in the first two...
My Assignment: Write a class named Rectangle to represent rectangles. The data fields are width, height, and color. Use double for width and height, and String for color. Suppose that all the...