Status: Not Started
Objective
Write a function that returns the team +/- for the home team given an array of scores.
"team +/-" means the total difference between the points scored by the home team and the points given up. It could be a negative number.
Scores will be in a 2-D array
- 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
Team +/-
Unit Test
1
2
public int teamPlusMinus(int[][] games)
{
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output
Grading
Docs
Exercise
More
History
Video
Download
About
Upload
W
Test Cases
x/x
Pass | Test | Message | |
---|---|---|---|
- | Test results will show here. | - |
Errors:
4 points
Write a function that returns the team +/- for the home team given an array of scores.
“team +/-” means the total difference between the points scored by the home team and the points given up. It could be a negative number.
Scores will be in a 2-D array in the format:
int[][] games = {
{84, 92},
{95, 93},
{86, 88},
{86, 83},
{112, 103},
{105, 95}
};
Java
Each “game” will have two numbers: the home score and the away score.
You should write a function called teamPlusMinus
that takes a parameter games
and computes the total +/- of these games for the home team.
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
Upload Media
File URL:
Your browser does not support recording media.
Please use up-to-date Chrome or Firefox in order to use audio and video recordings in your programs. Uploading files and taking photos should still work in your current browser.
Please use up-to-date Chrome or Firefox in order to use audio and video recordings in your programs. Uploading files and taking photos should still work in your current browser.