My teacher just told me that whenever I create a class to run something for a video game company that uses Eclipse, I should make a run class with the main and any outputs. He says any arithmetic should then be put in its own class. Here's the example he gave us.//triangleimport java.util.Scanner;import java.lang.Math.*;import java.lang.String;public class Lab03a {  //this class is used to test Triangle    public static void main( String[] args ) {        Scanner keyboard = new Scanner(System.in);        //ask for user input        System.out.print(Enter side A ::  );        int a = keyboard.nextInt();        System.out.print(Enter side B ::  );        int b = keyboard.nextInt();        System.out.print(Enter side C ::  );        int c = keyboard.nextInt();        Triangle test = new Triangle(a, b, c);        test.calcPerimeter();        test.calcArea();        test.toString();        System.out.println(Area +test.toString());        //ask for user input        System.out.print(Enter side A ::  );        a = keyboard.nextInt();        System.out.print(Enter side B ::  );        b = keyboard.nextInt();        System.out.print(Enter side C ::  );        c = keyboard.nextInt();        test.setSides(a,b,c);        test.calcPerimeter();        test.calcArea();        test.toString();        System.out.printf(%.3f\n,(test.toString()));        //add one more input section}}The other class:import java.util.Scanner;import java.lang.Math.*;public class Triangle {    private int sideA, sideB, sideC;    private double perimeter;    private double theArea;    private double s;    public Triangle() {        setSides(0,0,0);        perimeter=0;        theArea=0;        s=0;    }    public Triangle(int a, int b, int c) {        sideA=a;        sideB=b;        sideC=c;    }    public void setSides(int a, int b, int c) {        sideA=a;        sideB=b;        sideC=c;    }    public void calcPerimeter( ) {        perimeter=sideA+sideB+sideC;    }    public void calcArea() {         s=perimeter/2;         theArea=(Math.sqrt(s*(s-sideA)*(s-sideB)*(s-sideC)));    }    public String toString() {        String output = +theArea+\n\n;        return output;    }}Is this universally true for gaming companys? True for some? Or would most accept this?
Why would a video game need main(String[] args) in its own class?
unit testing;testing;coding standards
This is universally true for any Java program.Since a class is not a program it cannot run, think of the Main class and run method as the entry point to the program.In response to your comment read up on SRP from the SOLID principles: http://en.wikipedia.org/wiki/Single_responsibility_principle.For example, your triangle class will contain all of its logic and nothing else, it should be really good at that job and not be responsible for anything else. So you will need a class for the entry/execution to the application, which is the Main class.Also, i simply have the first class with all the methods then have the main at the end, so your program would be a single object, this isn't OO and is a particular anti-pattern, see: http://en.wikipedia.org/wiki/God_objectIn learning OO, this is where you make the jump from thinking about functionality at the method level and start thinking about the object level.