Description: . A class definition Point, represents a Point, public property have x and y, a method that Point coordinates show (), there are two arguments constructor respectively to x, y assignment, in the main method constructed of two objects, to create a method (getMiddle) to take two make the Point of the line of coordinate, parameters for 2 Point object, call this method after get a new Point, write Application, display the object coordinates.
1. Define a plural (z = x+ iy) kind of Complex, including:
Two attributes: real part x and imaginary part y
The default constructor Complex (), set x = 0, y = 0
The constructor: Complex (int I, int j)
Show the plural method: showComp () will be the display for such as: 5+ 8 I or 5-8 I form.
For two of the plural and methods: (parameters are two plural class object, the return value is a plural class object) public Complex addComp (Complex C1, Complex C2)
For two of the plural of poor methods: (parameters are two plural class object, the return v
To Search:
File list (Check if you may need any files):
fushu.doc