文件名称:Matrix
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 李*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
个人原创代码:编写Java Application程序的方法,声明一个矩阵类Matrix,成员变量是一个二维数组,设数组元素类型为int,请设计方法:
(1)构造方法:
Matrix() //构造一个10X10个元素的矩阵,没有数据
Matrix(int n,int m) //构造一个nXm个元素的矩阵,数据由随机数产生
Matrix(int table[][]) //以一个整型的二维数组构造一个矩阵
要求使用 this
(2) 实例方法:
public void output() //输出Matrix类中数组的元素值
public void transpose() //输出一个矩阵的转置矩阵
2.随机数求法:
Math.random( )返回0-1的小数,由上题中的Matrix类派生出正方形Square类,在构造方法中调用父类的构造方法(使用super)。-The original code of the individual: the preparation method of the Java Application program to declare a matrix class Matrix member variable is a two-dimensional array, set the array element type int, the design method:
(1) constructor:
Matrix ()// construct a 10X10 one element matrix, there is no data
Matrix (int n, int m)// construct a nXm elements of the matrix, the data generated by the random number
Matrix (int table [] [])// an integer of two-dimensional array construct a matrix
To the use of this
(2) an instance method:
public void output ()// output the array element values in the Matrix class
public void transpose ()// output a matrix transpose matrix
(2) random number and method:
Math.random () back to 0-1 decimal, square Square class derived from the Matrix class in the previous question, in the constructor to call the superclass constructor (using super).
(1)构造方法:
Matrix() //构造一个10X10个元素的矩阵,没有数据
Matrix(int n,int m) //构造一个nXm个元素的矩阵,数据由随机数产生
Matrix(int table[][]) //以一个整型的二维数组构造一个矩阵
要求使用 this
(2) 实例方法:
public void output() //输出Matrix类中数组的元素值
public void transpose() //输出一个矩阵的转置矩阵
2.随机数求法:
Math.random( )返回0-1的小数,由上题中的Matrix类派生出正方形Square类,在构造方法中调用父类的构造方法(使用super)。-The original code of the individual: the preparation method of the Java Application program to declare a matrix class Matrix member variable is a two-dimensional array, set the array element type int, the design method:
(1) constructor:
Matrix ()// construct a 10X10 one element matrix, there is no data
Matrix (int n, int m)// construct a nXm elements of the matrix, the data generated by the random number
Matrix (int table [] [])// an integer of two-dimensional array construct a matrix
To the use of this
(2) an instance method:
public void output ()// output the array element values in the Matrix class
public void transpose ()// output a matrix transpose matrix
(2) random number and method:
Math.random () back to 0-1 decimal, square Square class derived from the Matrix class in the previous question, in the constructor to call the superclass constructor (using super).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Matrix.java
本Java程序设计详细要求.txt
本Java程序设计详细要求.txt