首页 > 其他分享 >测试

测试

时间:2023-09-17 23:45:08浏览次数:119  
标签:String System 测试 println ware public out

import java.util.Scanner;
public class WarehouseManagement {
public static void main(String[] args) {
WarehouseInformation ware []=new WarehouseInformation[5];
ware[0]=new WarehouseInformation("20203982","华为笔记本电脑","河北省光明正大有限公司","20230904","","003","0180350",100,0);
ware[1]=new WarehouseInformation("20203983","华为笔记本电脑","河北省光明正大有限公司","20230905","","004","0180351",200,0);
ware[2]=new WarehouseInformation("20203984","华为笔记本电脑","河北省光明正大有限公司","20230906","","005","0180352",300,0);
ware[3]=new WarehouseInformation("20203985","华为笔记本电脑","河北省光明正大有限公司","20230907","","006","0180353",400,0);
ware[4]=new WarehouseInformation("20203986","华为笔记本电脑","河北省光明正大有限公司","20230908","","007","0180354",500,0);
while(true){
menu.show();
int a=0;
Scanner num = new Scanner(System.in);
a = num.nextInt();
if(a==1){
menu.inmanagement(ware);
}
else if(a==2){
menu.xiugai(ware);
}
else if(a==3){
menu.chuku(ware);
}
else if(a==4){
menu.pandian(ware);
break;
}
else{
System.out.println("输入不正确,请重新输入");
}
}
}
}
public class WarehouseInformation {
private String itemno,itemname,suppliername,warehousingtime,shipmenttime,warehousenumber,warehouseplace;
private int itemnumber,outnumber;
WarehouseInformation(String itemno,String itemname,String suppliername,String warehousingtime,String shipmenttime,String warehousenumber,String warehouseplace,int itemnumber,int outnumber)
{
this.itemno=itemno;
this.itemname=itemname;
this.suppliername=suppliername;
this.warehousingtime=warehousingtime;
this.shipmenttime=shipmenttime;
this.warehousenumber=warehousenumber;
this.warehouseplace=warehouseplace;
this.itemnumber=itemnumber;
this.outnumber=outnumber;
}
public void setItemno(String s){itemno=s;}
public String getItemno(){return itemno;}
public void setItemname(String s){itemname=s;}
public String getItemname(){return itemname;}
public void setSuppliername(String s){suppliername=s;}
public String getSuppliername(){return suppliername;}
public void setWarehousingtime(String s){warehousingtime=s;}
public String getWarehousingtime(){return warehousingtime;}
public void setShipmenttime(String s){shipmenttime=s;}
public String getShipmenttime(){return shipmenttime;}
public void setWarehousenumber(String s){warehousenumber=s;}
public String getWarehousenumber(){return warehousenumber;}
public void setWarehouseplace(String s){warehouseplace=s;}
public String getWarehouseplace(){return warehouseplace;}
public void setItemnumber(int s){itemnumber=s;}
public int getItemnumber(){return itemnumber;}
public void setOutnumber(int s){outnumber=s;}
public int getOutnumber(){return outnumber;}
}
public class menu {
public static void show() {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n" +
"1、商品入库管理\n" +
"2、商品信息修改\n" +
"3、商品出库管理\n" +
"4、仓库盘点管理\n" +
"**********************************************************");
}

public static void inmanagement(WarehouseInformation ware[]) {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n" +
"请依次输入商品编码、商品名称、供货商信息、入库时间、存放仓库号、存放位置信息");
String num1;
Scanner num = new Scanner(System.in);
num1 = num.next();
int i;
for (i = 0; i < 5; i++) {
String args[]=new String[i];
if (ware[i].getItemno().equals(num1)) {
while (true) {
System.out.println("***********************************************************\n" +
"石家庄铁道大学前进22软件开发有限公司\n" +
"仓库管理系统2022版\n" +
"***********************************************************\n");
System.out.println("商品编号:" + ware[i].getItemno());
System.out.println("商品名称:" + ware[i].getItemname());
System.out.println("供货商信息:" + ware[i].getSuppliername());
System.out.println("入库时间:" + ware[i].getWarehousingtime());
System.out.println("存放仓库号:" + ware[i].getWarehousenumber());
System.out.println("存放位置信息:" + ware[i].getWarehouseplace());
System.out.println("入库商品数量:" + ware[i].getItemnumber());
System.out.println("该商品入库操作已完成,是否提交(Y/N)\n" +
"**********************************************************");

break;
}
}
if (i == 5) {
System.out.println("请重新输入");
}
}
}



public static void xiugai(WarehouseInformation ware[]) {
System.out.println("***********************************************************\n"+
"石家庄铁道大学前进22软件开发有限公司\n+"+
"仓库管理系统2022版\n"+
"***********************************************************\n"+
"请输入商品编号:XXXXXXXX\n"+
"**********************************************************");
String num1;
Scanner num = new Scanner(System.in);
num1=num.next();
int u;
u=num.nextInt();
switch(u){
case 1:

}
}
public static void chuku(WarehouseInformation ware[]){

}
public static void pandian(WarehouseInformation ware[]){
System.out.println("***********************************************************\n"+
"石家庄铁道大学前进22软件开发有限公司\n"+
"仓库管理系统2022版\n"+
"***********************************************************\n");
int i;
for (i = 0; i < 5; i++){
System.out.println("商品编号:" + ware[i].getItemno());
System.out.println("商品名称:" + ware[i].getItemname());
System.out.println("库存数量:");
}
String num1;
Scanner num = new Scanner(System.in);
num1 = num.next();
}
}

标签:String,System,测试,println,ware,public,out
From: https://www.cnblogs.com/yang-----/p/17710275.html

相关文章

  • 课堂测试精简版
    WarehouseInformation.java: package仓库管理系统; publicclassWarehouseInformation{privateStringitemno;//表示商品编号(有8位数字组成)privateStringitemname;//表示商品名称privateStringsuppliername;//表示供货商名称privateStringwarehousingtime......
  • 9.17测试代码
    packageceshi;publicclassWarehouseInformation{privateStringitemnode;//编号privateStringitemname;//名字privateStringsuppliername;//供应商privateStringwarehousingtime;//privateStringshipmenttime;privateStringwarehousenumb......
  • 测试题修改
    WarehouseInformation数据类publicclassWarehouseInformation{privateStringitemno;//商品编号privateStringitemname;//商品名称privateStringsuppliername;//供货商名称privateStringwarehousingtime;//入库时间privateSt......
  • 性能测试学习笔记(二)
    1.性能指标综述通常我们都从两个层面定义性能场景的需求指标:业务指标和技术指标。这两个层面需要有映射关系,技术指标不能脱离业务指标。所有的技术指标都是在有业务场景的前提下制定的,而技术指标和业务指标之间也要有详细的换算过程。这样一来,技术指标就不会是一块飞地。同时,在......
  • 渗透测试流程
    渗透测试流程一、渗透测试的相关知识1、标准的渗透测试流程信息收集寻找外网入口权限维持与提升内网渗透痕迹清除2、什么是社工?全称社会工程学。一种利用受害者心理弱点、本能反应、好奇心、信任、贪婪等心理陷阱进行诸如欺骗、伤害等危害手段取得自身利益的手法。3、......
  • 9.15课堂测试(已在文件发表)
    WarehouseInformation.java: package仓库管理系统;publicclassWarehouseInformation{privateStringitemno;//表示商品编号(有8位数字组成)privateStringitemname;//表示商品名称privateStringsuppliername;//表示供货商名称privateStringwarehou......
  • Postman测试金蝶云星空Webapi【协同开发云下的本地环境】
    业务背景:基于金蝶云星空提供的接口测试,交付之前或者联调之前开发者先自测,即使纠错,提高效率。  大致流程:先请求登录接口,获得token后再请求标准webapi或者自定义接口,这样上下文才不会空。 说明: 金蝶的接口格式一般为:http://ServerIp/K3Cloud/接口命名空间.接口实现类名......
  • 使用TestContainers在Docker中进行集成测试
    现代软件应用很少独立工作。典型的应用程序会与几个外部系统进行通信,如:数据库、消息系统、缓存提供商其他第三方服务。你应该编写测试确保一切正常运行。单元测试有助于隔离地测试业务逻辑,不涉及任何外部服务。它们易于编写并提供几乎即时的反馈。有了单元测试还不够,集......
  • 开学测试
    publicclassWarehouseInformation{privateStringitemno;privateStringitemname;privateStringsuppliername;privateStringwarehousingtime;privateStringshipmenttime;privateStringwarehousenumber;privateStringwarehouseplac......
  • 9.17课堂测试更改代码
    importjava.util.ArrayList;importjava.util.Scanner;publicclassmainFrame{publicstaticvoidmain(String[]args){ArrayList<WarehouseInformation>array=newArrayList<WarehouseInformation>();while(true){Syste......