文件名称:student
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2012-12-23
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- 徐*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
1.编写一个学生类Student,包含的属性有:学号(String类型)、姓名(String类型)、性别(String)、年龄(int);方法有: say()返回类型是void ,功能是向屏幕打印一行字“I am a Student!”。
2.在上题的基础上,编写一个类TestStudent实现学生对象的添加,在main方法中增加Student对象,编写程序完成以下功能:
1) 增加学生, “姓名:张三、学号:0001、性别:男、年龄:22。”
2) 分别输出张三的学号,姓名,性别,年龄
3.编写一个课程类Course,包含的属性有:课程编号(int类型),课程名(String类型) 。包含方法:设置课程、获得课程。
4.在Student类中添加一个属性:课程(Course类)
在类TestStudent中添加一个学生信息如下
“课程编号:1;课程名称:java; 姓名:张三 ;学号:0001; 性别:男 ;年龄:22。”
5.在Student类中添加构造方法初始化所有属性。提示:参考讲过的Person类
-Writing student class Student contains attributes: student number (String type), name (String type), gender (String), age (int) method: say () return type is void, the function is toscreen print his words "I am a Student!".
On the theme based on a class TestStudent students object to add to increase Student object in the main method, write a program to perform the following functions:
1) increasing the number of students, "Name: Joe Smith, student number: 0001, Gender: Male, Age: 22."
2) Output seating the student number, name, sex, age.
Write a curriculum classes Course contains attributes: Course ID (int type), course name (String type). Contains: curriculum, access to courses.
4 in the Student class to add a property: Course (Course)
Add a student in class TestStudent below
Course Code: 1 Course Name: java name: Joe Smith Student ID: 0001 Gender: Male Age: 22. "
Add a constructor to initialize all of the properties in the Student class. Hint: spoken Person class
2.在上题的基础上,编写一个类TestStudent实现学生对象的添加,在main方法中增加Student对象,编写程序完成以下功能:
1) 增加学生, “姓名:张三、学号:0001、性别:男、年龄:22。”
2) 分别输出张三的学号,姓名,性别,年龄
3.编写一个课程类Course,包含的属性有:课程编号(int类型),课程名(String类型) 。包含方法:设置课程、获得课程。
4.在Student类中添加一个属性:课程(Course类)
在类TestStudent中添加一个学生信息如下
“课程编号:1;课程名称:java; 姓名:张三 ;学号:0001; 性别:男 ;年龄:22。”
5.在Student类中添加构造方法初始化所有属性。提示:参考讲过的Person类
-Writing student class Student contains attributes: student number (String type), name (String type), gender (String), age (int) method: say () return type is void, the function is toscreen print his words "I am a Student!".
On the theme based on a class TestStudent students object to add to increase Student object in the main method, write a program to perform the following functions:
1) increasing the number of students, "Name: Joe Smith, student number: 0001, Gender: Male, Age: 22."
2) Output seating the student number, name, sex, age.
Write a curriculum classes Course contains attributes: Course ID (int type), course name (String type). Contains: curriculum, access to courses.
4 in the Student class to add a property: Course (Course)
Add a student in class TestStudent below
Course Code: 1 Course Name: java name: Joe Smith Student ID: 0001 Gender: Male Age: 22. "
Add a constructor to initialize all of the properties in the Student class. Hint: spoken Person class
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shiyan4
.......\Course.class
.......\Course.java
.......\Student.class
.......\Student.java
.......\TestStudent.class
.......\TestStudent.java