# BMI計算機 # 需求擷取 希望能做一個輸入身高體重後,能告訴我BMI值為多少,是否過輕或過重。 # 需求分析 1.BMI值 2.判斷是否過輕或過重 註:體重單位為公斤(kg),單位為公尺(m)。  # User case使用案例 ```plantuml @startuml :User:--->(輸入身高體重) :App:--->(計算BMI) :App:--->(判斷過重過輕) ``` # 使用者故事 小安是一名體重60kg,身高174cm。他想要測BMI,和體重是否適中。 小庸是一名體重65kg,身高171cm。他想要測BMI,和體重是否適中。 帥哥是一名體重65kg,身高175cm。他想要測BMI,和體重是否適中。 | 測資 | 輸入 | 輸出 | | -------- | -------- | -------- | | 測資1 | 身高174 體重60 | BMi=19.8 適中| |測資2 | 身高171 體重65 | BMi=22.2 適中| |測資3 | 身高175 體重65 | BMi=21.2 適中| # 流程圖 ```flow st=>start: Start e=>end: End op=>operation: 計算BMI op2=>operation: cond=>condition: BMI<18.5 cond2=>condition: BMI<27 BMI=>inputoutput: 輸入BMI small=>end: 過輕 normal=>end: 適中 fat=>end: 過重 st->BMI->op->cond->cond2 cond(yes)->small cond(no)->cond2 cond2(yes)->fat cond2(no)->normal ``` # UI及元件說明 ## UI 使用者介面  ## 元件說明 輸入框1:輸入身高 輸入框2:輸入體重 按鈕:計算BMI 標籤1:顯示BMI 標籤2:顯示過輕、適中、過重 # 程式截圖  # 心得及結論 這次我設計了相較上次更加複雜一些的程式,利用更多的功能包括計算和如果等等,而且這次程式也和生活息息相關,十分實用。
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.