все работает прекрасно, перепробовал все возможные решения что нашел на форуме, очень грущу :-(
package com.javarush.task.task21.task2113;
public class Horse {
String name;
double speed;
double distance;
public void move(){
distance += speed*Math.random();
}
public void print(){
int count = (int) Math.floor(distance);
while (count>0){
System.out.print('.');
count--;
}
System.out.println(name);
}
public Horse(String name, double speed, double distance) {
this.name = name;
this.speed = speed;
this.distance = distance;
}
public String getName() {
return name;
}
public double getSpeed() {
return speed;
}
public double getDistance() {
return distance;
}
public void setName(String name) {
this.name = name;
}
public void setSpeed(double speed) {
this.speed = speed;
}
public void setDistance(double distance) {
this.distance = distance;
}
}