用JAVA编写一个程序,要求如下:实现代码如下Java圣诞节表白代码:
Student类Java圣诞节表白代码:
public class Student {
private String name;
private String sex;
private int age;
private double chinese;
private double math;
private double english;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public double getChinese() {
return chinese;
}
public void setChinese(double chinese) {
this.chinese = chinese;
}
public double getMath() {
return math;
}
public void setMath(double math) {
this.math = math;
}
public double getEnglish() {
return english;
}
public void setEnglish(double english) {
this.english = english;
}
}
-----------------------------------------------------------------
StudentTest类:(测试类)
import java.util.Scanner;
public class StudentTest {
public static void main(String[] args) {
Student student = new Student();
Scanner sc = new Scanner(System.in);
System.out.println("请输入姓名:");
student.setName(sc.next());
System.out.println("请输入性别:");
student.setSex(sc.next());
System.out.println("请输入年龄:");
student.setAge(sc.nextInt());
System.out.println("请输入语文成绩、数学成绩、英语成绩:");
student.setChinese(sc.nextDouble());
student.setMath(sc.nextDouble());
student.setEnglish(sc.nextDouble());
Double count = student.getChinese()+ student.getMath()+student.getEnglish();
System.out.println("姓名:"+student.getName()+" 性别:"+student.getSex()+" 年龄:"+student.getAge());
System.out.println("总分:"+count+" 平均分:"+count/3);
}
}
运行结果为:
像这些QQ空间代码怎么使用?。?你给Java圣诞节表白代码的这种格式Java圣诞节表白代码的代码现在已经被腾讯封掉了不能用了
现在能用的代码都是如下格式的(提供些免费花匠的代码)
高级植物附带一个金色人参果代码:
javascript:window.top.space_addItem(7,11600,0,0,0,1,0); 蛋糕仔
javascript:window.top.space_addItem(7,10809,0,0,0,1,0); 快乐圣诞节
javascript:window.top.space_addItem(7,10810,0,0,0,1,0); 甜入心房
javascript:window.top.space_addItem(7,10104,0,0,0,1,0); 海底世界
javascript:window.top.space_addItem(7,10106,0,0,0,1,0); 清寒幽兰
javascript:window.top.space_addItem(7,6552,0,0,0,1,0); 独舞
javascript:window.top.space_addItem(7,6549,0,0,0,1,0); 纯朴
javascript:window.top.space_addItem(7,7981,0,0,0,1,0); 梦
javascript:window.top.space_addItem(7,7288,0,0,0,1,0); 荷缘
javascript:window.top.space_addItem(7,9997,0,0,0,1,0); christmas
javascript:window.top.space_addItem(7,9782,0,0,0,1,0); 梦之小屋
javascript:window.top.space_addItem(7,9784,0,0,0,1,0); 深海世界
javascript:window.top.space_addItem(7,9785,0,0,0,1,0); 深秋遗风
javascript:window.top.space_addItem(7,9465,0,0,0,1,0); 糖果屋
javascript:window.top.space_addItem(7,9361,0,0,0,1,0); 狮子圆舞曲
javascript:window.top.space_addItem(7,9362,0,0,0,1,0); 幽伤时刻
javascript:window.top.space_addItem(7,8980,0,0,0,1,0); 天星-白羊
javascript:window.top.space_addItem(7,8974,0,0,0,1,0); 博爱-水瓶
javascript:window.top.space_addItem(7,8032,0,0,0,1,0); 心心相应
javascript:window.top.space_addItem(7,7946,0,0,0,1,0); 可爱青春
javascript:window.top.space_addItem(7,7182,0,0,0,1,0); 花从锭放
推荐阅读
- 华为手机如何定制服务器,华为服务器怎么启动
- gis中的栅格计算器怎样调出,arcgis栅格计算器000539
- 史小坑电视怎么过,史小坑游戏攻略大全
- sap价格小数点,sap标准价格取值
- 猜数组游戏java代码 java数组猜数游戏
- sqlserver数据库备份任务,sql server备份数据库表
- 戴尔怎么改硬盘模式,戴尔修改硬盘模式
- 游戏冒险类,冒险类游戏排行榜前十
- java源代码选择 java源代码文件的命令