Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. package processor
  2.  
  3. import (
  4. "math"
  5. )
  6.  
  7. // EstimateCost calculates the cost in dollars applied using generic COCOMO2 weighted values based
  8. // on the average yearly wage
  9. func EstimateCost(effortApplied float64, averageWage int64) float64 {
  10. return effortApplied * float64(averageWage/12) * float64(1.8)
  11. }
  12.  
  13. // EstimateEffort calculate the effort applied using generic COCOMO2 weighted values
  14. func EstimateEffort(sloc int64) float64 {
  15. var eaf float64 = 1
  16.  
  17. // Numbers based on organic project, small team, good experience working with requirements
  18. var effortApplied = float64(3.2) * math.Pow(float64(sloc)/1000, 1.05) * eaf
  19. return effortApplied
  20. }
  21.  
  22. // EstimateScheduleMonths estimates the effort in months based on the result from EstimateEffort
  23. func EstimateScheduleMonths(effortApplied float64) float64 {
  24. // Numbers based on organic project small team, good experience working with requirements
  25. return float64(2.5) * math.Pow(effortApplied, 0.38)
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement