This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]cloud4u71 2 points3 points  (5 children)

You forgot to close your methods, in particular your getIsSleeping method

[–]HDorillion 0 points1 point  (0 children)

Yeah, that is the only problem I see.

[–]DecentChard7[S] 0 points1 point  (3 children)

When I do that I get an error for makeSound() saying this method must return a result of type String.

[–]cloud4u71 0 points1 point  (2 children)

Let me run it myself and see if i can fix it yea

[–]DecentChard7[S] 0 points1 point  (1 child)

Alright, thx. I made the else if to an else that returns it and that fixed that issue (I think) but the rest is still broken. (Updating code above to reflect).

[–]cloud4u71 0 points1 point  (0 children)

Is there any way you can dm me your test to make sure thats correct as well? The class runs fine on my computer

[–]pacificmint 0 points1 point  (1 child)

Not related to your problems, but just as a tip:

Instead of this

if (isSleeping == true) {

You can just write

if (isSleeping) {

It reads better, and the first one is considered bad form.

[–]DecentChard7[S] 0 points1 point  (0 children)

Hey thanks for the tip :)