@Test public void shouldOnlyCountItsOwnScore() throws Exception { LastFrame frame = new LastFrame(1, 9, 2); int score = frame.countScore(); assertThat(score, is(12)); }
@Override public int countScore() { return firstBall + secondBall + thirdBall; }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); @Override int countScore(); }
LastFrame extends Frame { @Override public int countScore() { return firstBall + secondBall + thirdBall; } LastFrame(int firstBall, int secondBall, int thirdBall); @Override int countScore();  }