We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import org.junit.Before; import org.junit.After; import org.junit.Test; import static org.junit.Assert.*; public class Exam2Test { @Before public void setUp() { // Setup code here (if required) } @After public void tearDown() { // Teardown code here (if required) } @Test public void testQuestion1() { var solution = (score1, score2, score3) -> { float total = score1 + score2 + score3; float avg = total / 3.0; if (avg >= 90) { return 'A'; } else if (avg >= 80) { return 'B'; } else if (avg >= 70) { return 'C'; } else if (avg >= 60) { return 'D'; } else { return 'F'; } }; for (int i = 0; i < 10; i++) { var score1 = (int) (Math.random() * 100); var score2 = (int) (Math.random() * 100); var score3 = (int) (Math.random() * 100); var actual = (new Exam2()).question1(score1, score2, score3); var expected = solution(score1, score2, score3); assertEquals(actual, expected); } } }
says
Error: Something went wrong while discovering the project. Caused by: Expected exactly one package name, found 0.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
says
The text was updated successfully, but these errors were encountered: