10/13 - Help


#1

Right, I have used the 'Get Code' thing on 10/13, and even with that done, it still doesn't work. Why isn't this working?

class Dog {
  
  int age;

	public Dog(int dogsAge) {
    
  	age = dogsAge;
    
  }
  
  public void bark() {
		
    System.out.println("Woof!");
    
	}
	
  public void run(int feet) {
    
    System.out.println("Your dog ran " + feet + " feet!");

	}
  
	public static void main(String[] args) {
    
    Dog spike = new Dog(5);
    spike.bark();
    spike.run(40);

	}

}

Please can you help me?


#2

having the exact same problem. Pretty sure that's a bug right there... FIX IT


#3

Yup same here, i also clicked "Get Code"


#4

I also have the same trouble. Now I still get held up there.


#5

Exactly the same problem. I get the right result in the consul window, but it complains I haven't put the run method between "bark" and "main". It's there, both in my code and in the replacement code. It won't let me through this stage


#6

Looked in another thread about this, it seems to work if you do it step by step and then run for each step. Which is counterintuitive because all the previous exercises let you/make you do them all in one go


#7

Can you please link the thread here. Thank You


#8

I have attempted to do step by step Ive tried putting the public void run thing every where and even got the code copied it in work and reset the assignment. Then I tried to reverse engineer it and its not working. I am literally looking at the code for it. Any ideas?


#10

So this is a bug then? Happening to me as well.


#11

Tiggie's right, you have to complete the first step first and then you can do the rest in one go.


#12

This worked for me, thanks!


#13

Step-by-step worked for me too. Thank you!


#14

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.