| ページ一覧 | ブログ | twitter |  書式 | 書式(表) |

MyMemoWiki

差分

ナビゲーションに移動 検索に移動
編集の要約なし
==[[ファンクションポイント 簡易マクロ]]==
[[ファンクションポイント]] | [[Excel VBA]] |
Const KEY_VALUE_DELIM_CHAR KEY_VALUE_DELIM_CHA[[R]] = ":" Const TRANSACTIONAL_TYPE_EI T[[R]]ANSACTIONAL_TYPE_EI = "EI" Const TRANSACTIONAL_TYPE_EO T[[R]]ANSACTIONAL_TYPE_EO = "EO" Const TRANSACTIONAL_TYPE_EQ T[[R]]ANSACTIONAL_TYPE_EQ = "EQ"
Const TRANSACTIONAL_COMPLEXITY_LOW TRANSACTIONAL_[[COM]]PLEXITY_LOW = "LOW" Const TRANSACTIONAL_COMPLEXITY_AVG TRANSACTIONAL_[[COM]]PLEXITY_AVG = "AVG" Const TRANSACTIONAL_COMPLEXITY_HIGH TRANSACTIONAL_[[COM]]PLEXITY_HIGH = "HIGH"
'トランザクショナルファンクションの複雑度を判定
'
Public Function FP_CALC_COMPLEXITYFP_CALC_[[COM]]PLEXITY(TransactionalFunctionType As Range, det As Range, ftr As Range) As String
Dim ft As String
Dim intDet As Integer
Dim intFtr As Integer
ft = Split(TransactionalFunctionType(1, 1).Text, KEY_VALUE_DELIM_CHARKEY_VALUE_DELIM_CHA[[R]])(0)
intDet = CInt(Val(det(1, 1).Text))
intFtr = CInt(Val(ftr(1, 1).Text))
Select Case ft
Case TRANSACTIONAL_TYPE_EIT[[R]]ANSACTIONAL_TYPE_EI
ret = CalcComplexityEI(intDet, intFtr)
Case TRANSACTIONAL_TYPE_EOT[[R]]ANSACTIONAL_TYPE_EO
ret = CalcComplexityEO_EQ(intDet, intFtr)
Case TRANSACTIONAL_TYPE_EQT[[R]]ANSACTIONAL_TYPE_EQ
ret = CalcComplexityEO_EQ(intDet, intFtr)
End Select
FP_CALC_COMPLEXITY FP_CALC_[[COM]]PLEXITY = ret
End Function
Public Function FP_CALC_FUNCTION_POINTFP_CALC_FUNCTION_[[POI]]NT(TransactionalFunctionType As Range, complexity As Range) As Integer
Dim ret As String
Dim ft As String
Dim comp As String
ft = Split(TransactionalFunctionType(1, 1).Text, KEY_VALUE_DELIM_CHARKEY_VALUE_DELIM_CHA[[R]])(0)
comp = UCase(Trim(complexity(1, 1).Text))
Select Case ft
Case TRANSACTIONAL_TYPE_EIT[[R]]ANSACTIONAL_TYPE_EI
Select Case comp
Case TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
ret = "3"
Case TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
ret = "4"
Case TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
ret = "6"
End Select
Case TRANSACTIONAL_TYPE_EOT[[R]]ANSACTIONAL_TYPE_EO
Select Case comp
Case TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
ret = "4"
Case TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
ret = "5"
Case TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
ret = "7"
End Select
Case TRANSACTIONAL_TYPE_EQT[[R]]ANSACTIONAL_TYPE_EQ
Select Case comp
Case TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
ret = "3"
Case TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
ret = "4"
Case TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
ret = "6"
End Select
FP_CALC_FUNCTION_POINT FP_CALC_FUNCTION_[[POI]]NT = CInt(Val(ret))
End Function
If ftr <= 1 Then
If det <= 4 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 5 <= det And det <= 15 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 16 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
End If
If ftr = 2 Then
If det <= 4 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 5 <= det And det <= 15 Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
If 16 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
End If
If 3 <= ftr Then
If det <= 4 Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
If 5 <= det And det <= 15 Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
If 16 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
End If
If ftr <= 1 Then
If det <= 5 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 6 <= det And det <= 19 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 20 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
End If
If 2 <= ftr And ftr <= 3 Then
If det <= 5 Then
ret = TRANSACTIONAL_COMPLEXITY_LOWTRANSACTIONAL_[[COM]]PLEXITY_LOW
End If
If 6 <= det And det <= 19 Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
If 20 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
End If
If 4 <= ftr Then
If det <= 5 Then
ret = TRANSACTIONAL_COMPLEXITY_AVGTRANSACTIONAL_[[COM]]PLEXITY_AVG
End If
If 6 <= det And det <= 19 Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
If 20 <= det Then
ret = TRANSACTIONAL_COMPLEXITY_HIGHTRANSACTIONAL_[[COM]]PLEXITY_HIGH
End If
End If

案内メニュー