13.Generalizations - can't finish lesson bug


#1

Hi, i am trying to finish this lesson now. I have properly code but even first step cannot be finished.

class Coffee extends Beverage {
	
	public Coffee() {

	}
	
	public void addSugar(int cubes) {

		System.out.println("You added " + cubes + " sugar cubes.");

	}

	public static void main(String[] args) {
    
    Coffee myOrder = new Coffee();
    myOrder.addSugar(2);
    myOrder.isFull();

	}
}

#2

Trying doing one step at a time and then click Run. Don't fill in all the steps at once.

You may have to reset the exercise to clean it up.


#3

I tried this options yesterday and today. I wrote down everything from begining and still doesnt work.:confused:


#4

in this statement

myOrder.isFull();

where did you implement the isFull() method
You have not implemented that method hence calling it will result in an error


#5

Did you do JUST step one, and then click Run, like this:


#6

I even "Get Code". Still nothing.


#7

Yes i did. Nothing like above.


#8

You have more code there than Step 1 is expecting.

myOrder.addSugar(2) is from Step 2
myOrder.isFull() is from Step 4,
etc.


#10

I did only 1. step but nothing happened. I reseted previous exercise, did it, and now everything goes fine. Thanks for advices :wink:


#11

I am getting the same error.


#12

Did you try the accepted solution yet?


#13

Yes, I did . But even then it doesnt get accepted :frowning:


#14

Please post a screen shot of your whole browser.


#15


#16

Could you reset that exercise and show it to me again, but without doing Steps 2, 3 and 4?


#17

Its working now. But I had done the same thing previously and it wasn't working then.


#18

The magic touch :smile:


#19

I've been having the same issue, I'm gonna try again tomorrow but I assume its just a bug.


#20

All - As an FYI, in order to complete Instruction 1 for this lesson Coffee myOrder = new Coffee(); must be in line 14! If it is line 15 you get this error. Thanks


#21

This didn't work for me...still getting the same error as those above.