Question subject: abstract factory implementation .please help me?
Posted: Fri Oct 15, 2010 2:34 pm
Joined: Mon Dec 29, 2008 5:04 am Posts: 4 Has thanked: 0 time Have thanks: 0 time
i want to make java application using abstract factory, Suppose you are asked to program adventure games. Characters contained in the game are Army and Civilian. The character the player has the ability to shoot (shoot). Each character is equipped with 100 units of ammunition. For Army character, each time firing the ammunition will decrease 2 units. While Civilian character, each time firing ammunition will be reduced as much as 3 units. If ammunition is not sufficient for the next shot, then show the text "RELOAD" for the Army and the words "HIDE" to Civilian. Create a program in accordance with the description above by applying the Factory Pattern.