急!!!求解一道C#编程题!!!!!
声明一个学员类,包括学号,姓名,电话,NET成绩,JAVA成绩,数据库成绩,并计算平均成绩和总成绩。我是C#初学者,之前根本没碰过C#,为了这个题目,我已经崩溃了…………...
声明一个学员类,包括学号,姓名,电话,NET成绩,JAVA成绩,数据库成绩,并计算平均成绩和总成绩。
我是C#初学者,之前根本没碰过C#,为了这个题目,我已经崩溃了………… 展开
我是C#初学者,之前根本没碰过C#,为了这个题目,我已经崩溃了………… 展开
5个回答
展开全部
public class Student {
public string Number;
public string Name;
public string PhoneNumber;
public int DotNetScore;
public int JavaScore;
public int DataBaseScore;
public Student(string number,string name,string phoneNumber,int dotNetScore,int javaScore,int dataBaseScore){
Number = number;
Name = name;
PhoneNumber = phoneNumber;
DotNetScore = dotNetScore;
JavaScore = javaScore;
DataBaseScore = dataBaseScore;
}
public int GetAVG() {
return (DotNetScore + JavaScore + DataBaseScore) / 3;
}
public int GetAll() {
return (DotNetScore + JavaScore + DataBaseScore);
}
}
public string Number;
public string Name;
public string PhoneNumber;
public int DotNetScore;
public int JavaScore;
public int DataBaseScore;
public Student(string number,string name,string phoneNumber,int dotNetScore,int javaScore,int dataBaseScore){
Number = number;
Name = name;
PhoneNumber = phoneNumber;
DotNetScore = dotNetScore;
JavaScore = javaScore;
DataBaseScore = dataBaseScore;
}
public int GetAVG() {
return (DotNetScore + JavaScore + DataBaseScore) / 3;
}
public int GetAll() {
return (DotNetScore + JavaScore + DataBaseScore);
}
}
追问
可不可以解释一下都是什么意思?我是初学者,很多地方都不懂。谢谢。
追答
在线说
展开全部
求程序就不要问了,最好自己思考再自己编嘛,不然你永远不会的,好不好!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
朋友,你有没有学过C#啊?这可是基础知识,你最好还是看看书吧,简单的问题还是自己想办法搞定,这样对你有帮助……
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
class xueyuan
{
public xueyuan(int xuehao,string xingming,int dianhua,int netchengji ,int javachengji,int sjkchengji)
{
xuehao=xuehao;
xingming=xingming;
dianhua=dianhua;
netchegnji=netchengji;
javachengji=javachegnji;
sjkchengji=sjkchengji;
}
int xuehao;
string xingming;
int dianhua;
int netchengji;
int javachengji;
int sjkchengji;
public int sum
{
set {netchengji+ javachengji+ sjkchengji=value;}
}
public float avg
{
set {sum/3=value;}
}
}
int sum;
float avg;
xueyuan xy=new xueyuan(1111,"张三",636366,80,70,60);
sum=xueyuan.sum;
avg=xueyuan.avg
{
public xueyuan(int xuehao,string xingming,int dianhua,int netchengji ,int javachengji,int sjkchengji)
{
xuehao=xuehao;
xingming=xingming;
dianhua=dianhua;
netchegnji=netchengji;
javachengji=javachegnji;
sjkchengji=sjkchengji;
}
int xuehao;
string xingming;
int dianhua;
int netchengji;
int javachengji;
int sjkchengji;
public int sum
{
set {netchengji+ javachengji+ sjkchengji=value;}
}
public float avg
{
set {sum/3=value;}
}
}
int sum;
float avg;
xueyuan xy=new xueyuan(1111,"张三",636366,80,70,60);
sum=xueyuan.sum;
avg=xueyuan.avg
追问
可以解释一下么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
class Stu
{
public string StuNo;
public string StuName;
public int StuPhone;
public int netMark;
public int javaMark;
public int sqlMark;
public string stuno
{
set { StuNo = value; }
get { return StuNo; }
}
public string stuname
{
set { StuName = value; }
get { return StuName; }
}
public int stuphone
{
set { StuPhone = value; }
get { return StuPhone; }
}
public int netmark
{
set { netMark = value; }
get { return netMark; }
}
public int javamark
{
set { javaMark = value; }
get { return javaMark; }
}
public int sqlmark
{
set { sqlMark = value; }
get { return sqlMark; }
}
public int Sum()
{
int strSum;
strSum = netMark + javaMark + sqlMark;
return strSum;
}
public int Average()
{
int strAver;
strAver = (netMark + javaMark + sqlMark) / 3;
return strAver;
}
}
{
public string StuNo;
public string StuName;
public int StuPhone;
public int netMark;
public int javaMark;
public int sqlMark;
public string stuno
{
set { StuNo = value; }
get { return StuNo; }
}
public string stuname
{
set { StuName = value; }
get { return StuName; }
}
public int stuphone
{
set { StuPhone = value; }
get { return StuPhone; }
}
public int netmark
{
set { netMark = value; }
get { return netMark; }
}
public int javamark
{
set { javaMark = value; }
get { return javaMark; }
}
public int sqlmark
{
set { sqlMark = value; }
get { return sqlMark; }
}
public int Sum()
{
int strSum;
strSum = netMark + javaMark + sqlMark;
return strSum;
}
public int Average()
{
int strAver;
strAver = (netMark + javaMark + sqlMark) / 3;
return strAver;
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询