首页 > 试题

computer是什么意思

更新时间:2023-02-01 00:41:01 阅读: 评论:0

三角形全等辅助线难题题库-高中基本不等式公式


2023年2月1日发(作者:我不是药神观后感)

JAVA中的stu什么意思_JAVA编程作业完成下⾯⽗类和⼦类的

定义:(1)定义Stude。。。

共回答了19个问题采纳率:78.9%

⽹上找的,你试试能⽤吗

publicclassStudentimplementsComparable{

publicStudent(Stringno,Stringname){

=no;

=name;

}

publicStudent(){

}

publicStudent(Stringno,Stringname,doubleenglish,doublemaths,

doublecomputer,doublesum){

=no;

=name;

h=english;

=maths;

er=computer;

=sum;

}

privateStringno;

privateStringname;

privatedoubleenglish;

privatedoublemaths;

privatedoublecomputer;

privateDoublesum=0.0;

publicStringgetNo(){

returnno;

}

publicvoidtNo(Stringno){

=no;

}

publicStringgetName(){

returnname;

}

publicvoidtName(Stringname){

=name;

}

publicdoublegetEnglish(){

returnenglish;

}

publicvoidtEnglish(doubleenglish){

h=english;

sum+=english;

}

publicdoublegetMaths(){

returnmaths;

}

publicvoidtMaths(doublemaths){

=maths;

sum+=maths;

}

publicdoublegetComputer(){

returncomputer;

}

publicvoidtComputer(doublecomputer){

er=computer;

sum+=computer;

}

publicDoublegetSum(){

returnsum;

}

publicvoidtSum(Doublesum){

=sum;

}

publicStringtoString(){

return"学号:"+no+"姓名"+name+"英语"+english+"数学"+maths+"计算机"+computer+"总成绩"+sum;

}

publicintcompareTo(Objecto){

eTo(((Student)o).getSum());

}

publicDoublesum(){

returnenglish+maths+computer;

}

publicDoubletestScore(){

returnsum/3;

}

}

publicclassStudentXWextendsStudent{

publicStudentXW(Stringno,Stringname){

super(no,name);

}

publicStudentXW(){

super();

}

privateStringduty;

publicStringgetDuty(){

returnduty;

}

publicvoidtDuty(Stringduty){

=duty;

}

publicDoubletestScore(){

ore()+3;

}

}

publicclassStudentBZextendsStudent{

publicStudentBZ(Stringno,Stringname){

super(no,name);

}

publicStudentBZ(){

super();

}

privateStringduty;

publicStringgetDuty(){

returnduty;

}

publicvoidtDuty(Stringduty){

=duty;

}

publicDoubletestScore(){

ore()+5;

}

}

publicclassTest{

publicstaticvoidmain(String[]args){

Studentstudent1=newStudent("001","1");

lish(60.0);

hs(60.0);

puter(60.0);

n(student1+"测试成绩是"+ore());

Studentstudent2=newStudentXW("002","2");

lish(70.0);

hs(70.0);

puter(70.0);

n(student2+"测试成绩是"+ore());

Studentstudent3=newStudentBZ("003","3");

lish(80.0);

hs(80.0);

puter(80.0);

n(student3+"测试成绩是"+ore());

}

}

1年前

2

本文发布于:2023-02-01 00:41:01,感谢您对本站的认可!

本文链接:http://www.wtabcd.cn/fanwen/fan/88/170379.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:my family
下一篇:其乐无穷
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图