The code is as follows:
Class student{private String name;private int age;private float english;private float math;private float computer;public S Tudent () {};p ublic Student (String name,int age,float english,float math,float computer) {this.setname (name); This.setage (age); This.setenglish (中文版); This.setmath (math); this.setcomputer (computer);} public float sum () {return math+computer+english;} public float max () {float Max=math>computer?math:computer;max=max>english?max:english;return max;} public Float Ave () {return MATH+COMPUTER+ENGLISH/3;} Public String GetName () {return name;} public void SetName (String name) {this.name = name;} public int getage () {return age;} public void Setage (int.) {this.age = age;} public float Getenglish () {return 中文版;} public void Setenglish (float 中文版) {this.english = 中文版;} public float Getmath () {return math;} public void Setmath (float math) {this.math = math;} public float Getcomputer () {return computer;} public void Setcomputer (float computer) {this.computer = computer;}} PubliC class StudentDemo1 {public static void main (string[] args) {Student s=new Student ("Obama", 56,35,88,19); System.out.println (S.getname ()); System.out.println (S.getage ()); System.out.println (S.getcomputer ()); System.out.println (S.getenglish ()); System.out.println (S.getmath ()); System.out.println (S.sum ()); System.out.println (S.ave ()); System.out.println (S.max ());}}
A simple class design topic