首页 > 其他分享 >9.2考试总结

9.2考试总结

时间:2022-09-03 21:45:30浏览次数:56  
标签:总结 room idx get System 9.2 println 考试 out

话不多说,先上代码;怎么说,照猫画虎,不得其精髓;既不得其精,自然需要提炼重点,由点到面系统性的学习。
这次的考试仅仅是一个开始,通过不断地参与考试,不断地练习题目,不断地发现自己的漏洞来完善,查漏补缺,尽快追上同学们的水平。
至于代码问题

package myjava01;

public class RoomInformation {

private String roomno,stunno1,stunno2,stunno3,stunno4;
private int hygienescore;
public String getRoomno()
{
return roomno;
}

public void setRoomno(String roomno)
{
this.roomno = roomno;
}

public String getStunno1()
{
return stunno1;
}

public void setStunno1(String stunno1)
{
this.stunno1 = stunno1;
}

public String getStunno2()
{
return stunno2;
}

public void setStunno2(String stunno2)
{
this.stunno2 = stunno2;
}
public String getStunno3()
{
return stunno3;
}

public void setStunno3(String stunno3)
{
this.stunno3 = stunno3;
}
public String getstunno4()
{
return stunno4;
}

public void setStunno4(String stunno4)
{
this.stunno4 = stunno4;
}
public int gethygienescore()
{
return hygienescore;
}

public void sethygienescore(int hygienescore)
{
this.hygienescore = hygienescore;
}

 

package myjava01;

import java.util.ArrayList;
import java.util.Scanner;
public class RoomManagement {
static Scanner sc=new Scanner(System.in);
static ArrayList<RoomInformation> room=new ArrayList<RoomInformation>();
public static void main(String[] args) {
room.add(new RoomInformation("9#101","20214000","20214001","20214002","20214003",0));
room.add(new RoomInformation("9#102","20214004","20214005","20214006","20214007",0));
room.add(new RoomInformation("9#103","20214008","20214009","20214010","",0));
room.add(new RoomInformation("9#104","20214011","20214012","20214013","20214014",0));
room.add(new RoomInformation("9#105","20214122","20214123","","",0));
room.add(new RoomInformation("9#106","20214124","","","",0));
room.add(new RoomInformation("9#107","","","","",0));
room.add(new RoomInformation("9#108","","","","",0));
room.add(new RoomInformation("9#109","","","","",0));
room.add(new RoomInformation("9#110","","","","",0));
while(true) {
preShow();
String s=sc.nextLine();
switch(s) {
case"1":while(handIn()==false);break;
case"2":while(ckc()==false);break;
case"3":while(ck()==false);break;
case"4":while();
case"5":while();
default:System.out.println("该选项不存在,请重新输入!");
}
}
}
static void showTitle() {
System.out.println("***********************************************************");
System.out.println("\t\t石家庄铁道大学公寓管理系统v2022");
}
static int getIdx(String S) {
while(true) {
showTitle();
System.out.println("\t\t\t宿舍号查询"+S);
System.out.println("***********************************************************");
System.out.println("\t\t\t请输入学生学号:XXXXXXXX");
System.out.println("**********************************************************");
String s=sc.nextLine();
for(int i=0;i<room.size();i++) {
if(room.get(i).getStunno1().equals(s)) {
return i;
}
}
System.out.println("该学号不存在,请重新输入");
}
}
public static void preShow() {
showTitle();
System.out.println("\t\t\t学生公寓管理系统 v2022");
System.out.println("***********************************************************");
System.out.println("\t\t\t1、宿舍查询");
System.out.println("\t\t\t2、安排新宿舍");
System.out.println("\t\t\t3、调整宿舍");
System.out.println("\t\t\t4、卫生检查情况查询");
System.out.println("***********************************************************");
}

public static boolean handIn() {
int idx=getIdx("提交");
RoomInformation a=new RoomInformation("","","","","",0);
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文提交");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getStunno2());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStunno3());
System.out.println("\t\t\t请输入毕业设计论文题目:XXXXXX XXXX");
System.out.println("**********************************************************");
String s=sc.nextLine();
if(s.length()<=10) {
a.setPapertitle(s);
break;
}
else System.out.println("毕业设计论文题目超过10个字符,请重新输入!");
}
StringBuilder sb=new StringBuilder();
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文提交");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getStunno2());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStunno3());
System.out.println("\t\t毕业设计论文题目:"+a.getPapertitle());
System.out.println("\t\t\t请输入毕业设计论文正文:XXXXXXXXXX");
System.out.println("**********************************************************");
int k=0;
while(k<=200) {
String s=sc.next();
int len=s.length();
sb.append(s+" ");
k+=len;
if(len>=3&&s.substring(len-3).equals("END")) {
break;
}
}
if(k<=200) {
a.setPaperbody(sb.toString());
String sos=sc.nextLine();
break;
}
else System.out.println("毕业设计论文正文超过200个字符,请重新输入!");
}
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文提交");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getStunno2());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStunno3());
System.out.println("\t\t毕业设计论文题目:"+a.getPapertitle());
System.out.println("\t\t\t毕业设计论文正文:"+a.getPaperbody());
System.out.println("\t\t该学生成绩已录入完毕,是否提交(Y/N)");
System.out.println("**********************************************************");
String s=sc.nextLine();
if(s.equals("Y")) {
a.setStunno1(room.get(idx).getStunno1());
a.setStunno2(room.get(idx).getStunno2());
a.setStunno3(room.get(idx).getStunno3());
room.set(idx,a);
return true;
}
else return false;
}
}
public static boolean ckc() {
int idx=getIdx("查重");
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文查重");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getStunno2());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStunno3());
System.out.println("\t\t\t毕业设计论文题目:"+room.get(idx).getPapertitle());
System.out.println("\t\t\t毕业设计论文正文:"+room.get(idx).getPaperbody());
System.out.println("\t\t\t请输入毕业设计论文查重率:XXXXXXXXXX");
System.out.println("**********************************************************");
double x=sc.nextDouble();
sc.nextLine();
if(x>=0&&x<=1) {
list.get(idx).setPaperpass(x);
break;
}
else System.out.println("查重率输入不符合要求,请重新输入!");
}
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文查重");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getName());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStuclass());
System.out.println("\t\t\t毕业设计论文题目:"+() list.get(idx)).getPapertitle());
System.out.println("\t\t\t毕业设计论文正文:"+list.get(idx).getPaperbody());
System.out.println("\t\t\t毕业设计论文查重率:"+list.get(idx).getClass());
System.out.println("\t\t\t\t(Y/N)");
System.out.println("**********************************************************");
String s=sc.nextLine();
if(s.equals("Y")) return true;
else return false;
}
}
public static boolean ck() {
int idx=getIdx("审查");
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文审查");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+list.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+list.get(idx).getName());
System.out.println("\t\t\t所在班级:"+list.get(idx).getStuclass());
System.out.println("\t\t毕业设计论文题目:"+list.get(idx).getPapertitle());
System.out.println("\t\t\t毕业设计论文正文:"+list.get(idx).getPaperbody());
System.out.println("\t\t\t毕业设计论文查重率:"+list.get(idx).getClass());
System.out.println("**********************************************************");
if(list.get(idx).getClass()>=0.2) {
System.out.println("该学生毕业设计论文重复率超过20%,不允许进行论文审查");
return false;
}
else break;
}
while(true) {
showTitle();
System.out.println("\t\t\t毕业设计论文查重");
System.out.println("***********************************************************");
System.out.println("\t\t\t学生学号:"+room.get(idx).getStunno1());
System.out.println("\t\t\t学生姓名:"+room.get(idx).getStunno2());
System.out.println("\t\t\t所在班级:"+room.get(idx).getStuclass());
System.out.println("\t\t毕业设计论文题目:"+room.get(idx).getPapertitle());
System.out.println("\t\t\t毕业设计论文正文:"+room.get(idx).getPaperbody());
System.out.println("\t\t\t毕业设计论文查重率:"+room.get(idx).getClass());
System.out.println("\t\t是否同意该学生参加毕业设计答辩:(Y/N)");
System.out.println("**********************************************************");
String s=sc.nextLine();
if(s.equals("Y")) {
room.get(idx).setPaperreview(true);
return false;
}
else return true;
}
}
public static void myExit() {
showTitle();
System.out.println("\t\t\t制作人:庄忠旭");
System.out.println("**********************************************************");
System.exit(0);
}
}

 

等于是抄代码,外加同学部分解释,我大体理解这个题目的基本框架,但是自己是不会搭建框架结构。
问题显而易见,就是学的少,了解的少,以至于某些知识点都没有理解总结到位。
既然在学校里,交了学费,浪费是可耻的,总有一天我要自己做出来!

 



public RoomInformation(String roomno ,String stunno1,String stunno2,String stunno3,String stunno4,int hygienescore)
{
this.roomno = roomno;
this.stunno1 = stunno1;
this.stunno2 = stunno2;
this.stunno3 = stunno3;
this.stunno4 = stunno4;
this.hygienescore = hygienescore;
}



}

 

标签:总结,room,idx,get,System,9.2,println,考试,out
From: https://www.cnblogs.com/XiMenXve/p/16653746.html

相关文章

  • linux 关机命令总结
    linux关机命令总结-wanggd_blog-博客园 https://www.cnblogs.com/wanggd/archive/2013/07/08/3177398.htmllinux下常用的关机命令有:shutdown、halt、poweroff、ini......
  • 2022-2023-1 20221402 《计算机基础与程序设计》第一周学习总结
    班级链接:https://edu.cnblogs.com/campus/besti/2022-2023-1-CFAP?filter=all作业要求:https://www.cnblogs.com/rocedu/p/9577842.html#WEEK01作业目标:快速浏览一遍教材计......
  • 9.2 字符串的常用操作_字符串的查询操作
     '''集合的生成式'''s='hello,hello'print(s.index('lo'))#3print(s.find('lo'))#3print(s.rindex('lo'))#9print(s.rfind('lo'))#9'''如果查找不存......
  • 本周总结(Docker)
    FROMcentosMAINTAINERzzx<[email protected]>ADDjdk-8u212-linux-x64.tar.gz/usr/localADDapache-tomcat-9.0.65.tar.gz/usr/localRUNyum-yinstallvimEN......
  • 9.2课堂测试总结
    本次课堂测试并没有取得理想的成绩,意识到自己在假期自学的不足之处。我平时的态度不够端正,并没有进行有效的练习,导致有很多知识并没有掌握,以至于见到没有做过的题目就手忙......
  • 开学考试总结
    本次考试我没有通过,获得了仅仅10.5分。在考试之后我对我的程序进行了全面的复盘。我发现了其中的问题所在:1.第二个功能中的标记(flag1)与主程序中的flag冲突(绿色部分)  ......
  • C#/.net面试知识点总结
    &和&&的区别相同点&和&&都可作逻辑与的运算符,表示逻辑与(and),当运算符两边的表达式的结果都为true时,其结果 才为true,否则,只要有⼀⽅为false,则结果为false。(ps:当要⽤到逻辑......
  • 2022-4分之3总结
    序:时间过得很快,是真的快,可能多了几根白发,关键是我还年轻,日。正文:心里面有很多想法,很多产品,很多软件,但是就是没法一一动手实现,这该怎么办,项目:0x1:从前......
  • 【MySQL】order by引起的慢查询问题总结
    最近遇到了一个SQL没有走索引导致出现慢查询的问题,SQL本身很简单,两张表联合查询然后进行排序和分页,由于涉及到一些业务,这里以用户表和订单表为例,用户表数据在35W左右,订单表......
  • 22.9.3 总结
    A求字符串插入多少字符后可以变为回文串。将字符串翻转后与原字符串求最长公共子串。\(ans=\min(i+j-2*f_{i,j}).(i+j=n-(n\mod2))\)code#include<algorithm>#incl......