Assignment2122_v1.docx - Word Arial 16...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
自動儲存體開 檔案 Assignment2122_v1.docx - Word 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 剪下 Arial 16 ▾ Aˆ A Aa A A IEEE A 直 複製 貼上 B I U ab ♡ 複製格式 剪貼簿 F x x² A A A ⑦ 字型 Г 段落 Г D 搜尋 LAW Cheuk Yin (210165298) 困 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 「尋找 ˇ bExit page 2+ 語音 編 輯器 編輯器 仓 共用 La 重複使 用檔案 口 註解 重複使用檔案| 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 金 選取 √ 樣式 編輯 Programming (ITP3914) Assignment •Assignment Due Date and Time 21 Nov 2021 (Sun) 11:55 pm< .Instructions to Students< page 1+ 1. This assignment is weighted 40% of the overall Continuous Assessment of this module.< 2. This assignment is an individual assignment and should be done by you only. Plagiarism will be treated seriously. Any submitted assignment is found that involved wholly or partly in plagiarism (no matter the assignments are from the original authors or from the plagiarists) will be scored Zero mark and the students involved will be received discipline penalty set by the institute accordingly. < 3. Only Java programming language is allowed to develop any required program.< 4. Your programs must be well structured. A comment should be included in each class and method to state its main function. Explanation of each variable is also required. The source code must be properly indented. The first few lines in a source file must be a comment stating the name of the source file, your name, class, student number as well as the description of the purposes of the program. Marks will be deducted if any of the above mentioned comment is not included.< 5. Grading of your programs will be based on correctness, quality, style, efficiency and the advanced features.< 6. You are required to hand in < o a softcopy of the program source codes uploaded to Moodle.< 7. Remember to backup all your program source codes.< 9. Late submission will NOT be accepted.< 2 < Programming (ITP3914) Assignment Assignment Specification< You are asked to write a BINGO game in Java.< ■ Information on the BINGO< BINGO is a game of chance in which each player matches numbers (from 1 to 25) printed in different arrangements on numbers the game host (caller) draws at random, marking the selected numbers with tiles. When a player finds the selected numbers are arranged on their card in a row, they call out "Bingo!" to alert all participants to a winning card, which prompts the game host (or an associate assisting the host) to examine the card for verification of the win. + 23 22 cards with the < 1 21 20 3 4 19 10 9 5 11 6 17 24 12 65 15 8 13 14 16 18 You can watch the game play on the Youtube: https://youtu.be/ANwuclD0vAo ■ Requirements of the Assignment< The BINGO game will be run in console mode. At the beginning, the program will display two players' cards on the screen. To simplify the program and the test procedure, the arrangement of 25 numbers on the cards are fixed.< 第1頁,共9頁 1367 個字 英文 (美國) ☆ 協助工具:調查 2 凹焦點 BB 100% 自動儲存 Assignment2122_v1.docx - Word 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 新細明體 12 ▾ Aˆ A Aa A A IEEE A 直 複製 貼上 ☆ 複製格式 BI Uab × ×² A A A ⑦ 剪貼簿 Б 字型 Г 段落 Assignment Г ○ 搜尋 LAW Cheuk Yin (210165298) 尋找~ AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 樣式 品取代 A 選取 √ 編輯 Programming (ITP3914) Player1's Card: 24 2 8 25 12 16 7 5 6 20 14 23 22 NAGGLO 10 18 11 21 Player2's Card: 15339 24 21 17 15 6 10 3 8 18 20 14 7 16 12 5 25 23 13 19 11 22 49 12 Game Host call (0 to exit): page 3+ A Game Host will input a number to your program. According to the corresponding number on players' cards, your program will mark a "XX" to replace the number.< Game Host call (0 to exit): 16 Player1's Card: 24 2 8 1 25 Programming (ITP3914) Assignment The program should also detect the following input errors:< Game Host call (0 to exit): 26 The number must be between 1 to 25, please call again! Game Host call (0 to exit): -1 The number must be between 1 to 25, please call again! Game Host call (0 to exit): 16 Player1's Card: 24 2 8 1 25 12 XX 7 17 15 55330 5 6 20 19 13 14 23 22 4 3 10 18 11 21 9 Player2's Card: 24 21 17 15 6 10 3 8 18 20 14 7 XX 12 5 25 23 13 19 11 22 4 9 1 2 page 4+ 12 XX 7 17 15 5 6 20 19 13 14 23 22 43 10 18 11 21 9 Player2's Card: 24 21 17 15 6 20 10 3 8 18 14 7 XX 12 5 25 23 13 19 11 22 49 1 2 Game Host call (0 to exit): ■ The program will show who is the winner if a player wins, and then end the game.< Game Host call (0 to exit): 23 Player1's Card: 24 XX 8 1 12 XX 7 17 15 5 XX XX 22339 19 13 4 ཌཌཝརྞ 14 XX XX XX XX 11 21 Player2's Card: 24 21 17 15 XX XX 38 XX XX 14 7 XX 12 5 25 XX 13 19 11 XX 4 9 1 XX Player1 Bingo! Player2 Bingo! 第3頁,共9頁 1367 個字 中文 (台灣) ☆ 協助工具: 調查 Game Host call (0 to exit): 16 The number 16 is repeated, please call again! Game Host call (0 to exit): ■ Furthermore, your program MUST allows Game Host to input 0 to quit the game.< 凹]焦點 BB 困 合共用 口 註解 Q聽寫讀 編 輯器 重複使 用檔案 語音 編輯器 |重複使用檔案 90% 自動儲 閉 Assignment2122_v1.docx - Word 案 常用 插入 繪圖 設計 版面配置 參考資料 ㅜ H 口 郵件 M 校關 檢視 說明 W & 剪下 「新細明體 12 - Α' Α' Aav Ao帻A A 団 複製 貼上 BI Uab x, x² Av ☆ 複製格式 DA A ⑦ == 剪貼簿 Б 字型 段落 ITP3914 Programming Assignment ▪ Testing Method Г ○ 搜尋 LAW Cheuk Yin (210165298) 困 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 尋找ˇ 品取代 A 選取 √ 樣式 編輯 2021/22+ ITP3914 Programming Assignment 2021/22+ 10 18 11 21 9 Player2's Card: You can ease the testing by using 'Copy and Paste' rather than inputting data manually. Prepare a text file, which includes all user inputs in a game run. The following input is an example. < < By using Copy and Paste, you can automatically input in the command prompt window and then get the result automatically (without the input data echoed).< 24 23 8 18 14 7 XX 12 25 23 13 19 22 4 9 1 6+ Game Host call (0 to exit): Player1's Card: 24 2 8 12 XX 7 125 < Test Case 28 -2 16 10 10 22 64 20 18 2 23 + Expected Outpute Playerl's Card:+ 24 2 8 12 16 7 17 15 5 6 20 19 14 23 22 4 3 10 18 11 21 9 Player2's Card:+ 24 21 17 10 3 8 18 20- 14 7 16 12 25 23 13 11 22 4 9 2 Game Host call (0 to exit): 28 -24 16 10 10 22 20 18 2 23 5 6 20 14 23 22 4 XX 18 11 21 Player2's Card: 9 24 21 17 15 6 XX 3 8 18 20 14 7 XX 12 5+ 25 23 13 19 22 9 1 2 Game Host call (0 to exit): The number 10 is repeated, please call again! Game Host call (0 to exit): Player1's Card:< 24 2 1 25 12 XX 7 15- 14 23 XX 18 11 21 Player2's Card:+ 24 21 17 15 XX 3 8 18 20 14 7 XX 12 23 19 a 'go 5 6 20 19 13 4 3 9- 1 Game Host call (0 to exit): Player1's Card: 24 1 25 12 XX 7 17 15 5 XX 14 23 19 4 XX 18 11 21 Player2's Card:+ ཝཱཎྞསྶ |:ཁ 24 21 17 15 XX XX 3 8 18 20 14 7 XX 12 25 23 XX 4 19 1 2 Game Host call (0 to exit): Playerl's Card:+ The number must be between 1 to 25, please call again! Game Host call (0 to exit): The number must be between 1 to 25, please call again! Game Host call (0 to exit): Player1's Card: 24 2 8 24 2 8 1 25 12 XX 7 17 15 5 XX XX 19 14 23 XX 4 12 XX 7 6 20 14 23 22 4 3 第5頁,共9頁 1367 個字 中文(台灣) ☆ 協助工具:調查 Page 5 of 9+ XX 18 11 21 31 Player2's Card: 24 21 17 15 XX- 語音 編 輯器 重複使 用檔案 編輯器 |重複使用檔案 Page 6 of 9+ 凹焦點 BB 90% 自動儲存 Assignment2122_v1.docx - Word ○ 搜尋 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 新細明體 v 12 ν Α' Α' Aa A A 直 複製 貼上 BIU ab ☆ 複製格式 x, x² A A A ⑦ === 剪貼簿 Б 字型 Г 段落 Г ITP3914 Programming XX 3 8 18 14 工 12 t 25 23 13 11 - XX 4 9 1 Game Host call (0 to exit): (< Playerl's Card: () 24 2 8 12 XX 7 17 15 (1 5 XX XX 14 23 XX XX 11 21 Player2's Card: () 24 21 17 15 XX XX 4 19 13 # 31 9- XX 3 8 XX XX 14 7 XX 12 5 1 25 23 13 19 11 - 9 1 Game Host call (0 to exit): (H Playerl's Card:() 24x 8 12 XX 7 5 XX XX 19 13 # 14 23 XX 3 XX XX 11 9 Player2's Card: () 24 21 17 XX 3 8 XX 25 23 13 19 XX XX 4 9 1 XX Game Host call (0 to exit): + Playerl's Card: () 24 XX 12 XX 7 17 5 XX XX 19 13 1 14 XX XX 4 XX XX 11 3 # 9 Player2's Card:() 24 21 17 15 XX 3 8 XX XX + 14 7 XX 12 5 1 25 XX 13 19 XX 4 9 1 Playerl Bingo!) Player2 Bingo!! e 11 - XX< ttt1 第7頁,共9頁 1367 個字 中文(台灣) ☆ 協助工具:調查 Assignment LAW Cheuk Yin (210165298) 困 合共用 口 註解 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 製標題 2 標題 3 鲜明引文 區別強調 鮮明強調 尋找~ 品取代 A 選取 √ 編 輯器 重複使 用檔案 模式 編輯 語音 編輯器 |重複使用檔案 2021/22+ ITP3914 Programming Assignment ▪ Requirement for Scanner usage Wrong Scanner usage:< // create new Scanner objects in loope do {H Scanner sc = new Scanner( System.in); « choice = sc.nextInt(); } while (choice_!= 1);< 仙 2021/22← You are NOT allowed to use GUI such as JOptionPane in your program.< Following is an example program to use import java.util.Scanner;< public class Test {' //Global declaration for Scannere Global Scanner to do the input.< public static Scanner sc = new Scanner(System.in);/ public static void main(String args[]) {< } int xye System.out.print("Enter x:");\ x = sc.nextInt();) public static void method2 () {' int Vi System.out.print ("Enter y:");< y = sc.nextInt();/ + 凹]焦點 目 90% 自動儲存 Assignment2122_v1.docx - Word ○ 搜尋 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 Arial 12 ~AA Aa A+ A 直 複製 貼上 B ☆ 複製格式 剪貼簿 Б I Uab x, x² ADA A ⑦ 字型 ≡≡ 段落 Г 第9頁,共9頁 1367 個字 英文 (美國) 焱 協助工具: 調查 LAW Cheuk Yin (210165298) 困 合共用 口 註解 「尋找 ~ AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBb( AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 製標題 2 標題 3 鲜明引文 區別強調 鮮明強調 樣式 品取代 洽 選取 √ 編輯 ITP3914 Programming ▪ Marking Scheme 20 marks (e + Assignment 2021/22+ Correctly draw the players' card with marked numbers according to Game Host's input. (-) 20 marks(e Your program will detect two kinds of errors:< Game Host input error: input number is not within 0 to 25. Game Host input error: input duplicated number.< Game Host input 0 to quit the game.< 40 marks e Correct program logic - determine winner and then end game.< 10 marks (e Use good program structure (indentation), appropriate methods and meaningful variables' names.< 10 marks e Documentation (Comments).< : Deductione Cannot pass the Java compiler -100< Do not follow the requirement and corresponding output in↓ "Testing Method" -30- More than one Scanner objects in your codes -20吋 Do not use Scanner as the one and only one input method in your codes -50 Cannot perform a demonstration to your lecturer -50(← 語音 編 輯器 重複使 用檔案 編輯器 |重複使用檔案 凹焦點 90% 自動儲存體開 檔案 Assignment2122_v1.docx - Word 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 剪下 Arial 16 ▾ Aˆ A Aa A A IEEE A 直 複製 貼上 B I U ab ♡ 複製格式 剪貼簿 F x x² A A A ⑦ 字型 Г 段落 Г D 搜尋 LAW Cheuk Yin (210165298) 困 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 「尋找 ˇ bExit page 2+ 語音 編 輯器 編輯器 仓 共用 La 重複使 用檔案 口 註解 重複使用檔案| 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 金 選取 √ 樣式 編輯 Programming (ITP3914) Assignment •Assignment Due Date and Time 21 Nov 2021 (Sun) 11:55 pm< .Instructions to Students< page 1+ 1. This assignment is weighted 40% of the overall Continuous Assessment of this module.< 2. This assignment is an individual assignment and should be done by you only. Plagiarism will be treated seriously. Any submitted assignment is found that involved wholly or partly in plagiarism (no matter the assignments are from the original authors or from the plagiarists) will be scored Zero mark and the students involved will be received discipline penalty set by the institute accordingly. < 3. Only Java programming language is allowed to develop any required program.< 4. Your programs must be well structured. A comment should be included in each class and method to state its main function. Explanation of each variable is also required. The source code must be properly indented. The first few lines in a source file must be a comment stating the name of the source file, your name, class, student number as well as the description of the purposes of the program. Marks will be deducted if any of the above mentioned comment is not included.< 5. Grading of your programs will be based on correctness, quality, style, efficiency and the advanced features.< 6. You are required to hand in < o a softcopy of the program source codes uploaded to Moodle.< 7. Remember to backup all your program source codes.< 9. Late submission will NOT be accepted.< 2 < Programming (ITP3914) Assignment Assignment Specification< You are asked to write a BINGO game in Java.< ■ Information on the BINGO< BINGO is a game of chance in which each player matches numbers (from 1 to 25) printed in different arrangements on numbers the game host (caller) draws at random, marking the selected numbers with tiles. When a player finds the selected numbers are arranged on their card in a row, they call out "Bingo!" to alert all participants to a winning card, which prompts the game host (or an associate assisting the host) to examine the card for verification of the win. + 23 22 cards with the < 1 21 20 3 4 19 10 9 5 11 6 17 24 12 65 15 8 13 14 16 18 You can watch the game play on the Youtube: https://youtu.be/ANwuclD0vAo ■ Requirements of the Assignment< The BINGO game will be run in console mode. At the beginning, the program will display two players' cards on the screen. To simplify the program and the test procedure, the arrangement of 25 numbers on the cards are fixed.< 第1頁,共9頁 1367 個字 英文 (美國) ☆ 協助工具:調查 2 凹焦點 BB 100% 自動儲存 Assignment2122_v1.docx - Word 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 新細明體 12 ▾ Aˆ A Aa A A IEEE A 直 複製 貼上 ☆ 複製格式 BI Uab × ×² A A A ⑦ 剪貼簿 Б 字型 Г 段落 Assignment Г ○ 搜尋 LAW Cheuk Yin (210165298) 尋找~ AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 樣式 品取代 A 選取 √ 編輯 Programming (ITP3914) Player1's Card: 24 2 8 25 12 16 7 5 6 20 14 23 22 NAGGLO 10 18 11 21 Player2's Card: 15339 24 21 17 15 6 10 3 8 18 20 14 7 16 12 5 25 23 13 19 11 22 49 12 Game Host call (0 to exit): page 3+ A Game Host will input a number to your program. According to the corresponding number on players' cards, your program will mark a "XX" to replace the number.< Game Host call (0 to exit): 16 Player1's Card: 24 2 8 1 25 Programming (ITP3914) Assignment The program should also detect the following input errors:< Game Host call (0 to exit): 26 The number must be between 1 to 25, please call again! Game Host call (0 to exit): -1 The number must be between 1 to 25, please call again! Game Host call (0 to exit): 16 Player1's Card: 24 2 8 1 25 12 XX 7 17 15 55330 5 6 20 19 13 14 23 22 4 3 10 18 11 21 9 Player2's Card: 24 21 17 15 6 10 3 8 18 20 14 7 XX 12 5 25 23 13 19 11 22 4 9 1 2 page 4+ 12 XX 7 17 15 5 6 20 19 13 14 23 22 43 10 18 11 21 9 Player2's Card: 24 21 17 15 6 20 10 3 8 18 14 7 XX 12 5 25 23 13 19 11 22 49 1 2 Game Host call (0 to exit): ■ The program will show who is the winner if a player wins, and then end the game.< Game Host call (0 to exit): 23 Player1's Card: 24 XX 8 1 12 XX 7 17 15 5 XX XX 22339 19 13 4 ཌཌཝརྞ 14 XX XX XX XX 11 21 Player2's Card: 24 21 17 15 XX XX 38 XX XX 14 7 XX 12 5 25 XX 13 19 11 XX 4 9 1 XX Player1 Bingo! Player2 Bingo! 第3頁,共9頁 1367 個字 中文 (台灣) ☆ 協助工具: 調查 Game Host call (0 to exit): 16 The number 16 is repeated, please call again! Game Host call (0 to exit): ■ Furthermore, your program MUST allows Game Host to input 0 to quit the game.< 凹]焦點 BB 困 合共用 口 註解 Q聽寫讀 編 輯器 重複使 用檔案 語音 編輯器 |重複使用檔案 90% 自動儲 閉 Assignment2122_v1.docx - Word 案 常用 插入 繪圖 設計 版面配置 參考資料 ㅜ H 口 郵件 M 校關 檢視 說明 W & 剪下 「新細明體 12 - Α' Α' Aav Ao帻A A 団 複製 貼上 BI Uab x, x² Av ☆ 複製格式 DA A ⑦ == 剪貼簿 Б 字型 段落 ITP3914 Programming Assignment ▪ Testing Method Г ○ 搜尋 LAW Cheuk Yin (210165298) 困 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 * 標題 2 標題 3 鮮明引文 區別強調 鮮明強調 尋找ˇ 品取代 A 選取 √ 樣式 編輯 2021/22+ ITP3914 Programming Assignment 2021/22+ 10 18 11 21 9 Player2's Card: You can ease the testing by using 'Copy and Paste' rather than inputting data manually. Prepare a text file, which includes all user inputs in a game run. The following input is an example. < < By using Copy and Paste, you can automatically input in the command prompt window and then get the result automatically (without the input data echoed).< 24 23 8 18 14 7 XX 12 25 23 13 19 22 4 9 1 6+ Game Host call (0 to exit): Player1's Card: 24 2 8 12 XX 7 125 < Test Case 28 -2 16 10 10 22 64 20 18 2 23 + Expected Outpute Playerl's Card:+ 24 2 8 12 16 7 17 15 5 6 20 19 14 23 22 4 3 10 18 11 21 9 Player2's Card:+ 24 21 17 10 3 8 18 20- 14 7 16 12 25 23 13 11 22 4 9 2 Game Host call (0 to exit): 28 -24 16 10 10 22 20 18 2 23 5 6 20 14 23 22 4 XX 18 11 21 Player2's Card: 9 24 21 17 15 6 XX 3 8 18 20 14 7 XX 12 5+ 25 23 13 19 22 9 1 2 Game Host call (0 to exit): The number 10 is repeated, please call again! Game Host call (0 to exit): Player1's Card:< 24 2 1 25 12 XX 7 15- 14 23 XX 18 11 21 Player2's Card:+ 24 21 17 15 XX 3 8 18 20 14 7 XX 12 23 19 a 'go 5 6 20 19 13 4 3 9- 1 Game Host call (0 to exit): Player1's Card: 24 1 25 12 XX 7 17 15 5 XX 14 23 19 4 XX 18 11 21 Player2's Card:+ ཝཱཎྞསྶ |:ཁ 24 21 17 15 XX XX 3 8 18 20 14 7 XX 12 25 23 XX 4 19 1 2 Game Host call (0 to exit): Playerl's Card:+ The number must be between 1 to 25, please call again! Game Host call (0 to exit): The number must be between 1 to 25, please call again! Game Host call (0 to exit): Player1's Card: 24 2 8 24 2 8 1 25 12 XX 7 17 15 5 XX XX 19 14 23 XX 4 12 XX 7 6 20 14 23 22 4 3 第5頁,共9頁 1367 個字 中文(台灣) ☆ 協助工具:調查 Page 5 of 9+ XX 18 11 21 31 Player2's Card: 24 21 17 15 XX- 語音 編 輯器 重複使 用檔案 編輯器 |重複使用檔案 Page 6 of 9+ 凹焦點 BB 90% 自動儲存 Assignment2122_v1.docx - Word ○ 搜尋 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 新細明體 v 12 ν Α' Α' Aa A A 直 複製 貼上 BIU ab ☆ 複製格式 x, x² A A A ⑦ === 剪貼簿 Б 字型 Г 段落 Г ITP3914 Programming XX 3 8 18 14 工 12 t 25 23 13 11 - XX 4 9 1 Game Host call (0 to exit): (< Playerl's Card: () 24 2 8 12 XX 7 17 15 (1 5 XX XX 14 23 XX XX 11 21 Player2's Card: () 24 21 17 15 XX XX 4 19 13 # 31 9- XX 3 8 XX XX 14 7 XX 12 5 1 25 23 13 19 11 - 9 1 Game Host call (0 to exit): (H Playerl's Card:() 24x 8 12 XX 7 5 XX XX 19 13 # 14 23 XX 3 XX XX 11 9 Player2's Card: () 24 21 17 XX 3 8 XX 25 23 13 19 XX XX 4 9 1 XX Game Host call (0 to exit): + Playerl's Card: () 24 XX 12 XX 7 17 5 XX XX 19 13 1 14 XX XX 4 XX XX 11 3 # 9 Player2's Card:() 24 21 17 15 XX 3 8 XX XX + 14 7 XX 12 5 1 25 XX 13 19 XX 4 9 1 Playerl Bingo!) Player2 Bingo!! e 11 - XX< ttt1 第7頁,共9頁 1367 個字 中文(台灣) ☆ 協助工具:調查 Assignment LAW Cheuk Yin (210165298) 困 合共用 口 註解 AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBbC AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 製標題 2 標題 3 鲜明引文 區別強調 鮮明強調 尋找~ 品取代 A 選取 √ 編 輯器 重複使 用檔案 模式 編輯 語音 編輯器 |重複使用檔案 2021/22+ ITP3914 Programming Assignment ▪ Requirement for Scanner usage Wrong Scanner usage:< // create new Scanner objects in loope do {H Scanner sc = new Scanner( System.in); « choice = sc.nextInt(); } while (choice_!= 1);< 仙 2021/22← You are NOT allowed to use GUI such as JOptionPane in your program.< Following is an example program to use import java.util.Scanner;< public class Test {' //Global declaration for Scannere Global Scanner to do the input.< public static Scanner sc = new Scanner(System.in);/ public static void main(String args[]) {< } int xye System.out.print("Enter x:");\ x = sc.nextInt();) public static void method2 () {' int Vi System.out.print ("Enter y:");< y = sc.nextInt();/ + 凹]焦點 目 90% 自動儲存 Assignment2122_v1.docx - Word ○ 搜尋 檔案 常用 插入 繪圖 設計 版面配置 參考資料 郵件 校關 檢視 說明 X剪下 Arial 12 ~AA Aa A+ A 直 複製 貼上 B ☆ 複製格式 剪貼簿 Б I Uab x, x² ADA A ⑦ 字型 ≡≡ 段落 Г 第9頁,共9頁 1367 個字 英文 (美國) 焱 協助工具: 調查 LAW Cheuk Yin (210165298) 困 合共用 口 註解 「尋找 ~ AaBbCc AaBbCcD AaBbCcl AaBbCc AaBb( AaBb AaBb( AaBbc AaBbCc AaBbCcl AaBbCcl 內文 副標題 強調斜體 強調粗體 標題 製標題1 製標題 2 標題 3 鲜明引文 區別強調 鮮明強調 樣式 品取代 洽 選取 √ 編輯 ITP3914 Programming ▪ Marking Scheme 20 marks (e + Assignment 2021/22+ Correctly draw the players' card with marked numbers according to Game Host's input. (-) 20 marks(e Your program will detect two kinds of errors:< Game Host input error: input number is not within 0 to 25. Game Host input error: input duplicated number.< Game Host input 0 to quit the game.< 40 marks e Correct program logic - determine winner and then end game.< 10 marks (e Use good program structure (indentation), appropriate methods and meaningful variables' names.< 10 marks e Documentation (Comments).< : Deductione Cannot pass the Java compiler -100< Do not follow the requirement and corresponding output in↓ "Testing Method" -30- More than one Scanner objects in your codes -20吋 Do not use Scanner as the one and only one input method in your codes -50 Cannot perform a demonstration to your lecturer -50(← 語音 編 輯器 重複使 用檔案 編輯器 |重複使用檔案 凹焦點 90%
Expert Answer:
Answer rating: 100% (QA)
import javautilRandom public class Main public static void mainString args int number1 10 30 45 66 8... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
This assessment item relates to the unit learning outcomes as in the unit descriptor. This assessment is designed to improve student collaborative skills in a team environment and to give students...
-
Jontil Co. began the current period with a $14,000 balance in the Peter Jontil, Capital account. At the end of the period, the company's adjusted account balances include the following temporary...
-
The balance sheets of Global Trading Company follow: Balance Sheets as of December 31, Additional Information: The Company reported a net loss of $279,500 during 2017. There are no income taxes. ...
-
Why do proteins, built from instructions contained in an organisms genes, determine many of an organisms traits?
-
Write a short note on Global Warming.
-
The stockholders equity accounts of Jajoo Corporation on January 1, 2011, were as follows. Preferred Stock (10%, $100 par noncumulative, 5,000 shares authorized) . $ 300,000 Common Stock ($5 stated...
-
How to write accountant and bookkeeper proposals and portfolios on Upwork
-
Prepare a financial report in response to a hypothetical scenario: A major global disaster (in this case an oil spill) has caused environmental damage and has affected global transportation as well....
-
The receivables control accounts is having the following transactions. Opening credit balance 500 Credit sales 10000, Discount allowed 3500, Bill receivable 1000, interest on undue account 500. What...
-
Identify three barriers to communication.
-
Identify three types of contexts that can influence communication.
-
What does it mean to encode and decode a message?
-
What is professional presence?
-
Imagine that you are trying to persuade a teammate to agree with an idea for a presentation, and the teammate accuses you of being manipulativetrying to influence someone for your own advantage. What...
-
Consider an analog signal x.(t) = cos(20nt), 011. It is sampled at Ts=0.01, 0.05, and 0.1 sec intervals to obtain x(n). Now compute x(n), where n-4 for each sampling frequency. Show your calculations.
-
Use of the contraceptive Depo Provera appears to triple women's risk of infection with chlamydia and gonorrhea , a study reports today. An estimated 20 million to 30 million women worldwide use Depo...
-
Yolanda is a cash basis taxpayer with the following transactions during the year: Cash received from sales of products........................................................................$65,000...
-
In 2012, Margaret and John Murphy are married taxpayers who file a joint tax return with AGl of $25,000. During the year they incurred the following expenses: Hospitalization insurance...
-
Steve Jackson (age 51) is a single taxpayer living at 3215 Pacific Dr., Del Mar, CA 92014. His Social Security number is 465-88-9415. In 2012, Steve's earnings and income tax withholding as the...
-
Scientists propose that the first macromolecules in protobionts were a. DNA molecules. b. RNA molecules. c. proteins. d. all of the above.
-
Which of the following function(s) is/are carried out by piRITS or piRISC? a. Inhibits transcription of TEs b. Causes the degradation of TE RNA c. Causes chromosome breakage d. Both a and b are...
-
In the CRISPR-Cas system, what does tracrRNA bind to? a. crRNA and Cas1 protein b. crRNA and Cas2 protein c. crRNA and Cas9 protein d. Cas1 and Cas2 proteins
Study smarter with the SolutionInn App