-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWarriorArray.java
More file actions
42 lines (34 loc) · 889 Bytes
/
WarriorArray.java
File metadata and controls
42 lines (34 loc) · 889 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//Jonathan Rumley
//CSC 160_401
//4/13/2020
//Classwork 10 - Warrior Arrays
public class WarriorArray
{
public static void main(String[] args)
{
WarriorFred[] warriors = new WarriorFred[5];
for(int x=0; x < 5; x++)
{
warriors[x] = new WarriorFred();
}
System.out.println("Here are the original five Warrior Fred characters: ");
for(int x=0; x < 5; x++)
{
warriors[x].printInfo();
}
warriors[0].setNickName("Jahtube");
warriors[1].setNickName("J_Quasi");
warriors[2].setNickName("E_Smalls");
warriors[3].setNickName("Muensters");
warriors[4].setNickName("Tone_Locc");
for(int x=0; x <5; x++)
{
warriors[x].getDamage();
}
System.out.println("\nBut here, are the updated versions of the five warrior characters: ");
for(int x=0; x < 5; x++)
{
warriors[x].printInfo();
}
}
}