/* * MethodName: ToString() * ReturnType: string * Summary: Prints the attributes of the object as a string in the specified format. */ public override string ToString() { Program obj = new Program(); return("z" + obj.Temp.ToString().PadRight(6, ' ') + " -- " + FName.PadLeft(12, ' ') + ", " + LName.PadRight(10, ' ') + "[" + Acdyear.ToString().PadRight(10, ' ') + "] " + "(" + Major.PadRight(15, ' ') + ") " + " | " + String.Format("{0:0.000}", GPA) + " |"); }