-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOOP.java
More file actions
52 lines (42 loc) · 1.74 KB
/
Copy pathOOP.java
File metadata and controls
52 lines (42 loc) · 1.74 KB
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
43
44
45
46
47
48
49
50
51
52
package JavaDev;
import java.util.*;
import JavaDev.SturdyPackage.CreationAgent;
import JavaDev.SturdyPackage.Destruction;
public class OOP {
public static void main (String args[]){
Weapon ChaosStaff = new Weapon("Staff of Chaos","Abyss");
Magi Gael = new Magi("Gael", "Destruction & Alteration", "Abyss", 19);
Magi Solomon = new Magi("Solomon", "Alteration & Restoration", "Light", 14, "Linda's Light");
Magi Sinbad = new Magi("Sinbad","Destruction","Lightning",20,"Belark's Thunder");
Magi[] Magis = new Magi[3];
ArrayList<Magi> Magises = new ArrayList<>();
Magises.add(Gael);
Magises.add(Solomon);
Magises.add(Sinbad);
Magis[0] = Gael;
Magis[1] = Solomon;
Magis[2] = Sinbad;
for (int i = 0; i < Magis.length; i++){
System.out.println(Magis[i].Name());
}
for (int i = 0; i < Magises.size(); i++){
System.out.println(Magises.get(i).Name());
}
ArrayList <Object> Artifacts = new ArrayList<>();
Artifacts.add(Gael);
Artifacts.add("ME");
Artifacts.add(12);
System.out.println(Artifacts);
System.out.println(Magis[0]);
System.out.println(Artifacts.get(2));
Gael.TakeWeapon(ChaosStaff);
Gael.MagesAura(); //since the Magisaura arraylist is static, we can access it using one of the instances of the Magi class
Gael.WhatWeapon().WeaponList();
Apprentice Yuan = new Apprentice("Yuan", "Gaming", "Play", 19, "BladeSpire");
Yuan.BattleCry();
Destruction Dire = new Destruction();
CreationAgent Test = new CreationAgent();
System.out.println(Test.passed);
Yuan.LearnNew();
}
}