Design a Student class, including name, gender, age, these three fields and corresponding properties, constructors (contain a parameter, a containing two parameters, a three parameters included), a common function print () is used to output information of the Student, in the Main () method, by the new statement three objects and the object is initialized, and then through the object access the print () method to the output of the three students information,
CodePudding user response:
Define a Student class, other all written within the main function is good, such a small Demo, two methods inside a class, call