This is my first program i have ever made in java and i am wonder what you all think of how its laid out and what i could do better to improve it or on the next program i make....It's a damage calculator for a game i play online thanks
package DamageCalc; import java.util.Scanner; public class DmgCalc { public static void main (String args[]) { int attack,element; Scanner input = new Scanner(System.in); System.out.println("Enter your Attack"); attack = input.nextInt(); System.out.println("What is your Element? (Use 1-4) 1-Fire 2-Water 3-Earth 4-Wind"); element = input.nextInt(); if(attack == 0) { System.out.println("Your damage is 0."); }else{ switch(element) { case 1: attack =(int)((attack * 1.4 + 0 - 2 * 0.98) * 1.6); System.out.println("Your Damage against your weak element is " + attack); break; case 2: attack =(int)((attack * 1.4 + 0 - 2 * 0.98) * 1.3); System.out.println("Your Damage against your weak element is " + attack); break; case 3: attack =(int)((attack * 1.4 + 0 - 2 * 0.98) * 1.4); System.out.println("Your Damage against your weak element is " + attack); break; case 4: element =(int)((attack * 1.4 + 0 - 2 * 0.98) * 1.3); System.out.println("Your Damage against your weak element is " + element); break; default: System.out.println("Exiting...Please follow directions."); } } } }