# 注意事項
1. 本次題型皆為GUI題型,請勿提交console app
2. 務必參考: [提交教學](https://hackmd.io/@CCUPD2025/Skl4xX6iJx),交錯檔案者0分算(因為我們也執行不了)
3. 不用太在意美觀,能達成主要目標100分一定給滿。
## Question 1
Write a GUI program named ***InchesToCentimetersGUI*** that allows the user to input a measurement in inches, click a Button, and output the value in centimeters. There are 2.54 centimeters in an inch.
- 目標: 寫一個 GUI 程式,讓使用者輸入數值(英吋),按下按鈕後,將其轉換為對應的公分數(1 英吋 = 2.54 公分),並顯示結果。
- Input Example 範例輸入:
使用者輸入:10(英吋)
- Output Example 範例輸出:
10 英吋 = 25.4 公分
- Program Example GUI程式範例:

## Question 2
Write a GUI program named ***ProjectedRaisesGUI*** that allows a user to enter an employee’s salary. Then display, with explanatory text, next year’s salary, which reflects a 4 percent increase.
- 目標: 寫一個 GUI 程式,讓使用者輸入員工的薪資,按下按鈕後,計算並顯示明年薪資,假設薪資每年增長 4%。
- Input Example 範例輸入:
使用者輸入:50000(薪資)
- Output Example 範例輸出:
明年薪資將為 52000 元(50000 × 1.04 = 52000)
## Question 3
Write a program named ***MoveEstimatorGUI*** that prompts a user for the number of hours for a moving job and the number of miles involved in the move. After the user clicks a Button, display the moving fee, which includes a base rate of $200 plus $150 per hour and $2 per mile.
- 目標: 寫一個 GUI 程式,讓使用者輸入搬家所需的工時數及搬運的里程數,按下按鈕後,計算總搬家費用。費用計算方式為:基本費 $200 + 每小時 $150 + 每英里 $2。
- Input Example 範例輸入:
使用者輸入:
工時數:3
里程數:50
- Output Example 範例輸出:
總搬家費用:$750
(計算方式:$200 + (3 × $150) + (50 × $2) = $750)
## Question 4
Write a GUI program named ***EggsInteractiveGUI*** that allows a user to input the number of eggs produced in a month by each of five chickens. Sum the eggs, then display the total in dozens and eggs. For example, a total of 127 eggs is 10 dozen and 7 eggs.
- 目標: 寫一個 GUI 程式,讓使用者輸入五隻雞在一個月內產下的雞蛋數量,按下按鈕後,計算總雞蛋數並換算為「打(dozen)」和剩餘雞蛋數(1 打 = 12 顆蛋),然後顯示結果。
- Input Example 範例輸入:
使用者輸入五隻雞的產蛋數:30、25、20、27、25
(You can use 5 input fields here, or read a whole line. All up to you, but you must let us know what to input in your program.)
- Output Example 範例輸出:
總共 127 顆蛋,相當於 10 打 7 顆蛋
(127 ÷ 12 = 10 打,餘數 7)
## Question 5
Write a GUI program named ***MakeChangeGUI*** that calculates and displays the conversion of an entered number of dollars into currency denominations—twenties, tens, fives, and ones. For example, $113 is 5 twenties, 1 ten, 0 fives, and 3 ones.
- 目標: 寫一個 GUI 程式,讓使用者輸入金額(美元),按下按鈕後,計算並顯示該金額可換算成多少張 20 元、10 元、5 元和 1 元的紙鈔。
- Input Example 範例輸入:
使用者輸入:113(美元)
- Output Example 範例輸出:
5 張 20 美元,1 張 10 美元,0 張 5 美元,3 張 1 美元
($113 可拆分為 5 × $20 + 1 × $10 + 0 × $5 + 3 × $1)