終了

slot machine

このプロジェクトは、フリーランサーの方々から17件の入札を受けています。平均入札額は$444 USDです。

このようなプロジェクトの無料見積もりを取得
作業中の採用者
プロジェクト予算
$10 - $30 USD
入札合計
17
プロジェクト情報

- Your task in this lab is to build a “slot machine” simulation.

- There are 3 JLabels, each displaying one of the three images, chosen at random. Clicking on the SPIN JButton randomly selects a new image for each label:

- If you click SPIN enough times you may get the same picture showing on all three labels. If this happens, the JButton will display “YOU WIN!” and the game is over (the JButton is disabled so that no more spins can happen):

Required functionality

- Display a JFrame whose title is your first and last name, followed by “’s Lab 8”. For example, the title of my JFrame must be “Carl Alphonce’s Lab 8”. Notice that the screenshots above do NOT show the correct title.

- Display three JLabels in one row, each displaying one of the supplied images.

- Display one JButton in by itself in the row below the JButtons, in the middle. (TA’s will give RECITATION ONLY HINT #3 for this.) The text of the JButton must be “SPIN”.

- Handle a button-click on the JButton by randomly choosing an image (from the ones supplied) to display on each of the three JLabels.

- If all three JLabels display the same image, change the text of the JButton to “YOU WIN!”, and disable it.

- Make appropriate use of conditionals (if-else or if statements) and loops (while, for, or enhanced for statements) to minimize code duplication.

- Structure the code to achieve a model-view separation.

必要なスキル

お金を稼ぎたいと思っていますか?

  • 予算と期限を設定してください
  • 提案のアウトラインを作成してください
  • 仕事の報酬を受け取りましょう

このプロジェクトにも入札したフリーランサーを採用する

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online