You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the file (in which team "superman" clearly wins ( 31 > 30) ) :
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
the input of my program:
data.csv
superman
the output of my program is:
Games: 1
Wins: 1
Losses: 0
This is what the checker says:
FAIL: SportStatisticTest winsAndLosses3
With the file:
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
When searcing for superman the output should have the line " Wins: 0".
the output was:
File:
Team:
Games: 0
With the file:
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
When searcing for superman the output should have the line " Wins: 0".
the output was: File: Team: Games: 0
Team.class file: ----------------------------------------------------------------------------------------------------
public class Team {
private String name;
private int wins;
private int losses;
private int gamesPlayed;
public Team(String name) {
this.name = name;
this.wins = 0;
this.losses = 0;
this.gamesPlayed = 0;
}
public void win() {
++wins;
}
public void lose() {
++losses;
}
public void playGame() {
++gamesPlayed;
}
public int getGamesPlayed() {
return this.gamesPlayed;
}
public int getWins() {
return this.wins;
}
public int getLosses() {
return this.losses;
}
public String getName() {
return this.name;
}
@Override
public String toString() {
return "Games: " + this.gamesPlayed + "\n" + "Wins: " + this.wins + "\n"
+ "Losses: " + this.losses;
}
With the file (in which team "superman" clearly wins ( 31 > 30) ) :
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
the input of my program:
data.csv
superman
the output of my program is:
Games: 1
Wins: 1
Losses: 0
This is what the checker says:
FAIL: SportStatisticTest winsAndLosses3
With the file:
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
When searcing for superman the output should have the line " Wins: 0".
the output was:
File:
Team:
Games: 0
With the file:
bestTeam,superteam,32,34
batman,superman,30,31
batman,robin,1,0
cats,dogs,3,0
When searcing for superman the output should have the line " Wins: 0".
the output was: File: Team: Games: 0
Team.class file: ----------------------------------------------------------------------------------------------------
public class Team {
}
SportStatistics.java file: ----------------------------------------------------------------------------------------------------
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Scanner;
public class SportStatistics {
}
additional error information:
Assert.java:88: org.junit.Assert.fail Assert.java:41: org.junit.Assert.assertTrue SportStatisticTest.java:133: SportStatisticTest.winsAndLosses3 NativeMethodAccessorImpl.java:-2: jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 NativeMethodAccessorImpl.java:62: jdk.internal.reflect.NativeMethodAccessorImpl.invoke DelegatingMethodAccessorImpl.java:43: jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Method.java:566: java.lang.reflect.Method.invoke FrameworkMethod.java:47: org.junit.runners.model.FrameworkMethod$1.runReflectiveCall ReflectiveCallable.java:12: org.junit.internal.runners.model.ReflectiveCallable.run FrameworkMethod.java:44: org.junit.runners.model.FrameworkMethod.invokeExplosively InvokeMethod.java:17: org.junit.internal.runners.statements.InvokeMethod.evaluate MockStdio.java:106: fi.helsinki.cs.tmc.edutestutils.MockStdio$1.evaluate RunRules.java:20: org.junit.rules.RunRules.evaluate ParentRunner.java:271: org.junit.runners.ParentRunner.runLeaf BlockJUnit4ClassRunner.java:70: org.junit.runners.BlockJUnit4ClassRunner.runChild BlockJUnit4ClassRunner.java:50: org.junit.runners.BlockJUnit4ClassRunner.runChild ParentRunner.java:238: org.junit.runners.ParentRunner$3.run ParentRunner.java:63: org.junit.runners.ParentRunner$1.schedule ParentRunner.java:236: org.junit.runners.ParentRunner.runChildren ParentRunner.java:53: org.junit.runners.ParentRunner.access$000 ParentRunner.java:229: org.junit.runners.ParentRunner$2.evaluate ParentRunner.java:309: org.junit.runners.ParentRunner.run TestRunner.java:134: fi.helsinki.cs.tmc.testrunner.TestRunner$TestingRunnable.runTestCase TestRunner.java:89: fi.helsinki.cs.tmc.testrunner.TestRunner$TestingRunnable.doRun TestRunner.java:70: fi.helsinki.cs.tmc.testrunner.TestRunner$TestingRunnable.run Thread.java:829: java.lang.Thread.run
The text was updated successfully, but these errors were encountered: