课堂检测

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

时间: 2024-08-02 00:43:20

课堂检测的相关文章

坑爹的C++要课堂检测了 然而我什么都没学

前六章的知识框架 概念(细枝末节的纠缠) 细节点的分析(坑逼) 实际的代码演练 ? Chapter1基础知识 进制 存储 Chapter2 简单程序 数据类型 运算符和表达式 数据类型转化 I/O Chapter3 控制结构 (循环嵌套是什么鬼) Chapter4 函数 Chapter5 数组(二维数组是什么鬼 然而完全不会) Chapter6 自定义数据类型(然而只会结构体) ? (卧槽这是什么鬼啊,别人 数学逻辑不错然而好东西我看不懂啊) (以后做作业解决问题也要好好写随笔 !) TAGS:

201671010106 2016-2017-2《Java程序设计》学习心得2

通过对第三章的学习,渐渐的更加了解了java这门课程,这门课程跟我们之前的c语言有相同之处,也有他特有的地方,在本章的学习过程中,我觉得我的课前准备预习工作做的还是不太好,当第一节课课堂检测的时候有些题根本不会,所以说对知识还是有一定的模糊,在看课件的时候也没有那么详细,有些知识点明明就可以在那些资源里找得到,可就是没有用心去看,导致自己很模糊. 这一章的知识点呢和c语言的有一定的相似度,比如在整型的那个里面,加了一个byte类型,这就是独特之处.而且在标识符那里也有独特的地方,从这一章开始自己

20145235《Java程序设计》课程总结

每周读书笔记链接汇总 20145235<Java程序设计>第1周学习总结 20145235<Java程序设计>第2周学习总结 20145235<Java程序设计>第3周学习总结 20145235<Java程序设计>第4周学习总结 20145235<Java程序设计>第5周学习总结 20145235<Java程序设计>第6周学习总结 20145235<Java程序设计>第7周学习总结 20145235<Java程序设计

201671010142 Java基本程序设计结构学习的感悟

1.在课堂检测过程中发现自己很大的问题,有些是在学习c语言时就遗留下来的问题,比如对于自加自减,强制类型转换的问题,在Java中又多了一个数据类型就是字节型,而且当字节想加就会自动生成int型,必须进行强制类型转化.布尔类型输出结果就是ture或者就是false,掌握到与c语言的不同. 2.对于数组也有明显的不同.java在数组声明时并不为数组分配空间内存.对于数组的拷贝,java允许把一个数组变量拷贝给另一个变量时,两个变量都指向相同的数组.对于各种语句的学习,语其他与语言的逻辑思维几乎一样.

超强记忆力提升九大心法-10连锁记忆法

学习随心记忆 人:记忆:遗忘:记忆曲线:七天不复习:忘完: 瞬时记忆:中短期:长期 (记忆) 人的记忆是灵活的:10-15岁期间,巅峰记忆: 用记忆方法,弥补记忆: 良好的睡眠: 睡眠,也是一个记忆转化的过程:水果,食物:规律的有氧运动:心情:好的心情状态:专注: 外界因素:复习频率,半个消失忘了,就这个时候去复习. 刺激强度,!!!除了日常刺激,然后也可以使用记忆法,9法,三大类 记忆怕混乱,混淆: 连锁记忆法短期记忆单元:七个单元(相对的) 把对象建立联系,记忆:减少记忆存储对象: (丰富的

课堂练习之检测水军

一.实验题目与设计思路 1.题目: 三人行设计了一个灌水论坛.信息学院的学生都喜欢在上面交流灌水,传说在论坛上有一个“水王”,他不但喜欢发帖,还会回复其他ID发的每个帖子.坊间风闻该“水王”发帖数目超过了帖子数目的一半. 如果你有一张当前论坛的帖子(包括回帖)列表,其中帖子的作者的ID也在其中,你能快速的找到这个传说中的水王吗? 2.设计思路 首先这个题目有有一个前提就是在总帖数一定的情况下,这些帖子里面有一半以上的帖子都设计到一个ID,这个ID就是水军,为了制止这个水军,就要检测出这个水军,那

课堂练习之检测水军(拓展)

一.题目 三人行设计了一个灌水论坛.随着论坛的发展,管理员发现水王没有了,但是统计结果表明,有三个发帖很多的ID.据统计他们的发帖数量超过了1/4,你能从发帖列表中快速找到他们吗? 二.设计思路 上一次是找出一个水军,这个水军发帖数超过了总帖数一半,这一次是找三个水军,这三个水军每一个人的帖子数都超过了总帖数的1/4,我们只需要在上一次的基础上进行改进就可以了,上一次是挨着消去两个,这次挨着消去四个,剩下最后的三个就是水军. 三.源代码 1 // shuitong.cpp : Defines t

翻转课堂

翻转课堂 翻转课堂译自“Flipped Classroom”或“Inverted Classroom”,是指重新调整课堂内外的时间,将学习的决定权从教师转移给学生.在这种教学模式下,课堂内的宝贵时间,学生能够更专注于主动的基于项目的学习,共同研究解决本地化或全球化的挑战以及其他现实世界面临的问题,从而获得更深层次的理解.教师不再占用课堂的时间来讲授信息,这些信息需要学生在课后完成自主学习,他们可以看视频讲座.听播客.阅读功能增强的电子书,还能在网络上与别的同学讨论,能在任何时候去查阅需要的材料.

Cocos开发中性能优化工具介绍之Visual Studio内存泄漏检测工具——Visual Leak Detector

那么在Windows下有什么好的内存泄漏检测工具呢?微软提供Visual Studio开发工具本身没有什么太好的内存泄漏检测功能,我们可以使用第三方工具Visual Leak Detector(以下简称vld). vld工具是VC++环境下一款小巧易用.免费开源的内存泄漏检测工具,vld可以显示导致内存泄漏的完整内存分配调用堆栈.vld的检测报告能够对每个内存泄漏点提供完整的堆栈跟踪,并且包含其源文件及行号信息. 安装过程是,先在到地址http://vld.codeplex.com/下载vld安