forked from Yandex-Practicum/Java-Module-Project-YP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
26 lines (18 loc) · 648 Bytes
/
Main.java
File metadata and controls
26 lines (18 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Auto newAuto1 = new Auto();
newAuto1.inputAutoData();
Auto newAuto2 = new Auto();
newAuto2.inputAutoData();
Auto newAuto3 = new Auto();
newAuto3.inputAutoData();
ArrayList<Auto> members = new ArrayList<>();
members.add(newAuto1);
members.add(newAuto2);
members.add(newAuto3);
Race leaderRace = new Race();
Auto leader = leaderRace.findLeader(members);
System.out.println("Самая быстрая машина: " + leader.getModel());
}
}