Better way to write this code?

I am making an rpg and need a way to store exp for the character and skill point and exp for the individual classes. Is there a faster and more efficient way to do this without having to type CLASSNAME_SP / CLASSNAME_exp for each individual class?

private void AddPoints(ClassType type, int SP_earn, int EXP_earn) {
        		EXP =+ EXP_earn;
        		if (type == ClassType.SQUIRE) {
        			SQUIRE_SP =+ SP_earn;
        			SQUIRE_exp =+ (int)(EXP_earn * 0.5);
        		} 
        		else if (type == ClassType.ALCHEMIST) {
        			ALCHEMIST_SP =+ SP_earn;
        			ALCHEMIST_exp =+ (int)(EXP_earn * 0.5);
        		} 
}

why not use your classtype enum as an index into an array of all SP/EXP? Something like:

private void AddPoints(ClassType type, int SP_earn, int EXP_earn) {
  EXP += EXP_earn;
  SP[(int)ClassType] += SP_earn;
  ClassEXP[(int)ClassType] += (int)(EXP_earn * 0.5);
}