Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FactionNames {
- public enum Faction {AMITY, ABNEGATION, DAUNTLESS, ERUDITE, CANDOR};
- }
- public Dauntless(String f, String l, int a, int ag, int end, Faction d) {
- super(f, l, a, d);
- if (ag >= 0 && ag <= 10) {
- this.agility = ag;
- } else {
- this.agility = 0;
- }
- if (end >= 0 && end <= 10) {
- this.endurance = end;
- } else {
- this.endurance = 0;
- }
- }
- D:DocumentsGoogle DriveHomework1331
- Test.java:3: error: cannot find symbol
- Faction test;
- ^
- symbol: class Faction
- location: class Test
- Test.java:4: error: cannot find symbol
- test = Faction.DAUNTLESS;
- ^
- symbol: variable Faction
- location: class Test
- 2 errors
- public class Test {
- public static void main(String[] args) {
- Faction test;
- test = Faction.DAUNTLESS;
- Dauntless joe = new Dauntless("Joseph", "Hooper", 20, 5, 3, test);
- Dauntless vik = new Dauntless("Victoria", "Ward", 19, 6, 2, test);
- Dauntless winner;
- winner = joe.battle(vik);
- System.out.println(winner);
- }
- }
- public class FactionNames {
- public enum Faction {AMITY, ABNEGATION, DAUNTLESS, ERUDITE, CANDOR};
- }
- import com.example.FactionNames.Faction;
- FactionNames.Faction test = FactionNames.Faction.DAUNTLESS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement