Just formatting App classes to be like the other class files on the project
This commit is contained in:
		| @@ -1,30 +1,28 @@ | ||||
| package com.iluwatar; | ||||
|  | ||||
| /** | ||||
|  *  | ||||
|  * In Factory Method we have an interface (Blacksmith) with a | ||||
|  * method for creating objects (manufactureWeapon). The concrete | ||||
|  * subclasses (OrcBlacksmith, ElfBlacksmith) then override the  | ||||
|  * method to produce objects of their liking. | ||||
|  * | ||||
|  * In Factory Method we have an interface (Blacksmith) with a method for | ||||
|  * creating objects (manufactureWeapon). The concrete subclasses (OrcBlacksmith, | ||||
|  * ElfBlacksmith) then override the method to produce objects of their liking. | ||||
|  * | ||||
|  */ | ||||
| public class App  | ||||
| { | ||||
|     public static void main( String[] args ) | ||||
|     { | ||||
|     	Blacksmith blacksmith; | ||||
|     	Weapon weapon; | ||||
|     	 | ||||
|     	blacksmith = new OrcBlacksmith(); | ||||
|     	weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR); | ||||
|     	System.out.println(weapon); | ||||
|     	weapon = blacksmith.manufactureWeapon(WeaponType.AXE); | ||||
|     	System.out.println(weapon); | ||||
|     	 | ||||
|     	blacksmith = new ElfBlacksmith(); | ||||
|     	weapon = blacksmith.manufactureWeapon(WeaponType.SHORT_SWORD); | ||||
|     	System.out.println(weapon); | ||||
|     	weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR); | ||||
|     	System.out.println(weapon); | ||||
| public class App { | ||||
|  | ||||
|     public static void main(String[] args) { | ||||
|         Blacksmith blacksmith; | ||||
|         Weapon weapon; | ||||
|  | ||||
|         blacksmith = new OrcBlacksmith(); | ||||
|         weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR); | ||||
|         System.out.println(weapon); | ||||
|         weapon = blacksmith.manufactureWeapon(WeaponType.AXE); | ||||
|         System.out.println(weapon); | ||||
|  | ||||
|         blacksmith = new ElfBlacksmith(); | ||||
|         weapon = blacksmith.manufactureWeapon(WeaponType.SHORT_SWORD); | ||||
|         System.out.println(weapon); | ||||
|         weapon = blacksmith.manufactureWeapon(WeaponType.SPEAR); | ||||
|         System.out.println(weapon); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user