课堂检测
时间:2019-09-13
本文章向大家介绍课堂检测,主要包括课堂检测使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
ScoreInformation类:
package ceshi;
class ScoreInformation {
private String stunumber;
private String name;
private double mathematicsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softwarescore;
public ScoreInformation(){
}
public ScoreInformation(String stunumber, String name, double mathematicsscore, double englishiscore, double networkscore, double databasescore, double softwarescore) {
this.stunumber = stunumber;
this.name = name;
this.mathematicsscore = mathematicsscore;
this.englishiscore = englishiscore;
this.networkscore = networkscore;
this.databasescore = databasescore;
this.softwarescore = softwarescore;
}
public String getStunumber() {
return stunumber;
}
public void setStunumber(String stunumber) {
this.stunumber = stunumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getMathematicsscore() {
return mathematicsscore;
}
public void setMathematicsscore(double mathematicsscore) {
this.mathematicsscore = mathematicsscore;
}
public double getEnglishiscore() {
return englishiscore;
}
public void setEnglishiscore(double englishiscore) {
this.englishiscore = englishiscore;
}
public double getNetworkscore() {
return networkscore;
}
public void setNetworkscore(double networkscore) {
this.networkscore = networkscore;
}
public double getDatabasescore() {
return databasescore;
}
public void setDatabasescore(double databasescore) {
this.databasescore = databasescore;
}
public double getSoftwarescore() {
return softwarescore;
}
public void setSoftwarescore(double softwarescore) {
this.softwarescore = softwarescore;
}
}
Main类:
package ceshi;
import java.util.*;
public class Main {
static ScoreInformation[] scoreInformations=new ScoreInformation[5];
static int n=0;
public static void main(String args[]){
while (true) {
Scanner scanner = new Scanner(System.in);
caidan1();
int select = 0;
select = scanner.nextInt();
switch (select) {
case 1:
caidan2();
add();
break;
case 2:
caidan3();
updata();
break;
case 4:
quite();
default:
System.exit(0);
break;
}
}
}
static void caidan1(){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系 ");
System.out.println(" 学生学籍管理系统 2019 版 ");
System.out.println("***********************************************************");
System.out.println(" 1、 学生考试成绩录入 ");
System.out.println(" 2、 学生考试成绩修改 ");
System.out.println(" 3、 计算学生成绩绩点 ");
System.out.println(" 4、退出学籍管理系统 ");
System.out.println("********************************************************** ");}
static public void caidan2(){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩录入 ");
System.out.println("***********************************************************");
System.out.println(" 请输入学生学号: ");
}
static public void caidan3(){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩修改界面 ");
System.out.println("***********************************************************");
System.out.println(" 请输入学生学号: ");
System.out.println("********************************************************** ");
}
static public void caidan4(){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩修改界面 ");
System.out.println("*********************************************************** ");
System.out.println(" 请输入需要修改科目的序号: ");
}
static void chushihua(){
scoreInformations[0]=new ScoreInformation();
scoreInformations[0].setName("马川");
String s="20183561";
scoreInformations[0].setStunumber(s);
scoreInformations[1]=new ScoreInformation();
scoreInformations[1].setName("张三");
String s1="20180000";
scoreInformations[1].setStunumber(s1);
scoreInformations[2]=new ScoreInformation();
scoreInformations[2].setName("李四");
String s2="20180001";
scoreInformations[2].setStunumber(s2);
scoreInformations[3]=new ScoreInformation();
scoreInformations[3].setName("harden");
String s3="20180002";
scoreInformations[3].setStunumber(s3);
scoreInformations[4]=new ScoreInformation();
scoreInformations[4].setName("james");
String s4="20180004";
scoreInformations[4].setStunumber(s4);
}
static void add(){
Scanner sc = new Scanner(System.in);
String stunumber=sc.nextLine();
for(int i=0;i<5;i++){
scoreInformations [i]= new ScoreInformation();
chushihua();
if(scoreInformations[i].getStunumber().equals(stunumber)){
System.out.println("学生姓名:" +scoreInformations[i].getName());
System.out.println("学生学号:"+scoreInformations[i].getStunumber());
System.out.println("请输入高等数学成绩:");
double mathematicsscore=sc.nextDouble();
System.out.println("请输入英语成绩");
double englishiscore=sc.nextDouble();
System.out.println("请输入计算机网络成绩");
double networkscore=sc.nextDouble();
System.out.println("请输入数据库成绩:");
double databasescore=sc.nextDouble();
System.out.println("请输入软件工程成绩:");
double softwarescore=sc.nextDouble();
System.out.println("该同学成绩已录入是否提交(Y/N)");
Scanner sc1=new Scanner(System.in);
String panduan=sc1.nextLine();
String y="Y";
if (panduan.equals(y)){
System.out.println("已成功录入!");
}
else{
int i1=0;
double d1=i1;
scoreInformations[i].setDatabasescore(d1);
scoreInformations[i].setEnglishiscore(d1);
scoreInformations[i].setMathematicsscore(d1);
scoreInformations[i].setNetworkscore(d1);
scoreInformations[i].setSoftwarescore(d1);
caidan2();
}
}
else{
System.out.println("查无此人");
}
break;
}
}
static void updata(){
Scanner sc2=new Scanner(System.in);
String stunumber2=sc2.nextLine();
for (int i=0;i<5;i++){
scoreInformations[i]=new ScoreInformation();
chushihua();
if (scoreInformations[i].getStunumber().equals(stunumber2)){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩修改界面 ");
System.out.println("*********************************************************** ");
System.out.println("学生学号:"+scoreInformations[i].getStunumber());
System.out.println("学生姓名:"+scoreInformations[i].getName());
System.out.println("1、高等数学成绩:"+scoreInformations[i].getMathematicsscore());
System.out.println("2、英语成绩:"+scoreInformations[i].getEnglishiscore());
System.out.println("3、数据库成绩:"+scoreInformations[i].getDatabasescore());
System.out.println("4、软件工程成绩:"+scoreInformations[i].getSoftwarescore());
System.out.println("5、网络成绩:"+scoreInformations[i].getNetworkscore());
}
else {
System.out.println("查无此人!");
}
}
caidan4();
Integer xuanze=sc2.nextInt();
switch (xuanze){
case 1:
}
}
static void quite(){
System.out.println("***********************************************************");
System.out.println(" 谢谢使用石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 制作人:马川 ");
System.out.println(" ***********************************************************");
}
}
原文地址:https://www.cnblogs.com/mac-13/p/11516703.html
- 简单方法检测远端用户的反病毒软件
- 使用 JS 构建跨平台的原生应用(一):React Native for Android 初探
- 基于Metronic的Bootstrap开发框架经验总结(9)--实现Web页面内容的打印预览和保存操作
- 在Windows上安装Jekyll
- 如何解决ajax跨域问题
- 基础篇章:React Native之 Image 的讲解
- 防守式编程的艺术
- Git 简单命令,木有高深内容
- 基础篇章:React Native之 ScrollView 的讲解
- 常用 Git 命令清单
- 如何将配置spring文件指定名字,指定位置
- 基础篇章:React Native 之 TextInput 的讲解
- Linux下 标准错误输出重定向
- CentOs6.5 修改主机名
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- PHP设计模式之组合模式定义与应用示例
- php使用socket调用http和smtp协议实例小结
- Ubuntu删除多余内核的办法
- php 使用mpdf实现指定字段配置字体样式的方法
- 虚拟机中CentOS7设置固定IP地址的方法
- CentOs下手动升级node版本的办法
- php设计模式之抽象工厂模式分析【星际争霸游戏案例】
- PHP使用PDO、mysqli扩展实现与数据库交互操作详解
- Linux中的who命令实例介绍
- php获取本年、本月、本周时间戳和日期格式的实例代码
- Smarty缓存机制实例详解【三种缓存方式】
- 详解在Ubuntu上的Apache配置SSL(https证书)的正确姿势
- php设计模式之建造器模式分析【星际争霸游戏案例】
- Yii框架使用PHPExcel导出Excel文件的方法分析【改进版】
- PHP容器类的两种实现方式示例