java开学考试源代码的基本结构

package com.a;

public class ScoreInformation {
private int stunumber;
private String name;
private String stuclass;
private String papertitle;
private String paperbody;
private double paperpass;
private boolean paperreview;
public int getStunumber() {
return stunumber;
}
public void setStunumber(int stunumber) {
this.stunumber = stunumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStuclass() {
return stuclass;
}
public void setStuclass(String stuclass) {
this.stuclass = stuclass;
}
public String getPapertitle() {
return papertitle;
}
public void setPapertitle(String papertitle) {
this.papertitle = papertitle;
}
public String getPaperbody() {
return paperbody;
}
public void setPaperbody(String paperbody) {
this.paperbody = paperbody;
}
public double getPaperpass() {
return paperpass;
}
public void setPaperpass(double paperpass) {
this.paperpass = paperpass;
}
public boolean isPaperreview() {
return paperreview;
}
public void setPaperreview(boolean paperreview) {
this.paperreview = paperreview;
}
public ScoreInformation (int stunumber, String name, String stuclass, String papertitle, String paperbody, double paperpass, boolean paperreview) {
this.stunumber = stunumber;
this.name = name;
this.stuclass = stuclass;
this.papertitle = papertitle;
this.paperbody = paperbody;
this.paperpass = paperpass;
this.paperreview = paperreview;
}
}

 

package com.a;
import java.util.Scanner;
public class PaperManagament {
public static void main(String[] args) {
ScoreInformation s1 = new ScoreInformation(20204222,"gaowei","10",";论文1","内容1",0.1,true);
ScoreInformation s2 = new ScoreInformation(20204223,"A","9",";论文2","内容2",0.1,true);
ScoreInformation s3 = new ScoreInformation(20204224,"B","8",";论文3","内容3",0.1,true);
ScoreInformation s4 = new ScoreInformation(20204225,"C","7",";论文4","内容4",0.1,true);
ScoreInformation s5 = new ScoreInformation(20204226,"D","6",";论文5","内容5",0.1,true);
ScoreInformation[] str = {s1,s2,s3,s4,s5};
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println("**************************************************");
System.out.println(" 1 毕业设计论文提交 ");
System.out.println(" 2 毕业设计论文查重 ");
System.out.println(" 3 毕业设计论文审查 ");
System.out.println(" 4 退出论文管理系统 ");
System.out.println("**************************************************");


int num = 0;
int snum;
Scanner sc = new Scanner(System.in);
num = sc.nextInt();
for(;;)
{
switch(num) {
case 1:
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println("**************************************************");
System.out.println(" 1 毕业设计论文提交 ");
System.out.println(" 请输入学号 ");
System.out.println("**************************************************");
Scanner sc1 = new Scanner(System.in);
snum = sc1.nextInt();
for(int i = 0; i<5 ;i++) {
if(str[i].getStunumber() == snum) {
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println(" 学生学号:"+ str[i].getStunumber());
System.out.println(" 学生姓名:"+ str[i].getName());
System.out.println(" 班级:"+ str[i].getStuclass());
System.out.println(" 请输入论文题目 ");
break;
}
}
break;
case 2:
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println(" 请输入论文题目 ");
break;
case 3:
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println(" 请输入论文内容 ");
break;
case 4:
System.out.println("*********************************************石家庄");
System.out.println(" 铁道大学软件工程系 ");
System.out.println(" 毕业设计论文管理系统2021版 ");
System.out.println(" ");
break;

}
}
}
}

posted @ 2021-09-18 21:05  信2005-2高维  阅读(25)  评论(0编辑  收藏  举报