Status: Started
Objective
Write a method that computes the Effective Field Goal percentage (eFG%) for a player.
You should call it `effectiveFieldGoalPercentage` and it will take three integers:
`fgm2` for 2-pt Field Goals Made
`fgm3` for 3-pt Field Goals Made
`fga` for total F
- Scratchpad.java
- Unit Test
Font Size
14
Parentheses autocomplete
Wrap lines
Editor
Theme
Code with blocks by default
Console Font Size
12
Console Theme
Display Server Graphics Screen
Show File Tab Bar
Debug Mode
Effective Field Goal Percentage
Unit Test
1
2
public double effectiveFieldGoalPercentage(int fgm2, int fgm3, int fga)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
History
Video
Download
About
W
Test Cases
x/x
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
This student is viewing this assignment in English. View this page in English?
6 points
Write a method that computes the Effective Field Goal percentage (eFG%) for a player.
You should call it effectiveFieldGoalPercentage
and it will take three integers:
fgm2
for 2-pt Field Goals Made
fgm3
for 3-pt Field Goals Made
fga
for total Field Goals Attempted.
eFG% is computed by the number of 2-pt field goals made + 1.5 times the number of 3-pt field goals made, divided by the total number of field goals attempted.
This means that a 3-pt field goal is worth 1.5 times as much as a 2-pt field goal, so we weight it higher to represent the greater efficiency of shooting 3-pointers.
Reset Code
Upload an image
Upload from your computer
Or paste a link here
Slides and Notes
No slides available for this video
About
Java Practice (main)
Java Version 1.8.0_222