<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                這個問題的第一步是switch語句.最好不要在另外一個對象的基礎上使用switch. 如果不得不使用,也應該在對象自己的數據上使用,而不是在別人數據上使用 Rental類 ~~~ public double getCharge(double thisAmount) { switch (getMovie().getPriceCode()) { case Movice.REGULAR: thisAmount += 2; if (getDaysRented() > 2) thisAmount += (getDaysRented() - 2) * 1.5; break; case Movice.NEW_RELEASE: thisAmount += getDaysRented() * 3; break; case Movice.CHILDRENS: thisAmount += 1.5; if (getDaysRented() > 3) thisAmount += (getDaysRented() - 3) * 1.5; break; } return thisAmount; } ~~~ 這暗示getCharge應該寫到Movie類里面 Movice類 ~~~ public double getCharge(double thisAmount, Rental rental) { switch (rental.getMovie().getPriceCode()) { case REGULAR: thisAmount += 2; if (rental.getDaysRented() > 2) thisAmount += (rental.getDaysRented() - 2) * 1.5; break; case NEW_RELEASE: thisAmount += rental.getDaysRented() * 3; break; case CHILDRENS: thisAmount += 1.5; if (rental.getDaysRented() > 3) thisAmount += (rental.getDaysRented() - 3) * 1.5; break; } return thisAmount; } ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看