28
Comments
  • 2
    Are you sure you don't want to add a function in that allows you to do something else ...

    I mean your not ever going to do anything else but fill it with coffee or drink 😂

    Or is the function run every time you look at the mug 🤔😏
  • 3
    Why would you instantiate a Coffee that was empty? What a redundant if statement. Comment should read: "I am a bad software engineer"
  • 0
    @linux-colonel it was meant to be comical. As a software developer you need a bit of that else you'll go mad.
  • 0
    @merlindiavova he isn't serious either ... Well he is but he doesn't mean it in a ... Get it fucking right! Serious way
  • 0
    Need this cup.
  • 4
    I think you'd like something along these lines better

    WorkDay day = new WorkDay();
    CoffeeCup cup = new CoffeeCup();
    while(day.hoursRemaining > 0) {
    . . if(cup.isEmpty) {
    . . . . cup.refill();
    . . }
    . . cup.drink();
    }
  • 0
    I think there is a while(true) missing
  • 2
    I'm assuming this is on a loop. So, every frame, you create a new cup of coffee, and refill or drink, then next loop, create another coffee cup. Why?
Add Comment