Joke Collection Website - Public benefit messages - Help, JAVA source code into a flowchart, with comments, thank you very much.

Help, JAVA source code into a flowchart, with comments, thank you very much.

First, define an abstract class Person, which has a member variable name, and then assign an initial value to it with this.name=name in the constructor. Then define an abstract method.

Then create a student class to inherit the abstract class. Note that subclasses of abstract classes must implement all methods of their parent classes, and they can also define their own properties and methods. Here is String grade.

String major;

Is an attribute defined by the subclass itself.

Then in the inherited showinfo (); Method to implement a subclass of a specific method.

In the construction method of subclass, first call the construction method of parent class, super ();

Then write a main method, assign a value to the variable, and then call showinfo (); Method, output information!