Status: Not Started
  • 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
True Shooting Percentage
Unit Test
public double trueShootingPercentage(int pts, int fga, int fta)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Pass Test Message

Errors:


6 points

Write a method that computes the True Shooting percentage (TS%) for a player.

True shooting percentage is a measure of shooting efficiency that takes into account field goals, 3-point field goals, and free throws

You should call it trueShootingPercentage and it will take three integers:

pts for number of points scored
fga for total Field Goals Attempted.
fta for total number of Free Throws Attempted

TS% is computed by weighting Free Throw Attempts as only 0.44 as much as a Field Goal Attempt.

You can use this computation to calculate TS%

Points / True Shooting Attempts

True Shooting Attempts (TSA) can be computed by Field Goal Attempts + (0.44) * Free Throw Attempts

Reset Code

Slides and Notes

No slides available for this video

About

Java Practice (main)
Java Version 1.8.0_222

Upload Media