MCPcopy Create free account
hub / github.com/careercup/ctci / main

Method main

java/Chapter 7/Question7_3/Question.java:8–21  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

6 }
7
8 public static void main(String[] args) {
9 for (int i = 0; i < 10; i++) {
10 Line line1 = new Line(randomInt(5), randomInt(1));
11 Line line2 = new Line(randomInt(5), randomInt(2));
12 line1.print();
13 System.out.print(", ");
14 line2.print();
15 if (line1.intersect(line2)) {
16 System.out.println(" YES");
17 } else {
18 System.out.println(" NO");
19 }
20 }
21 }
22
23}

Callers

nothing calls this directly

Calls 3

randomIntMethod · 0.95
printMethod · 0.95
intersectMethod · 0.95

Tested by

no test coverage detected