建民的JAVA课堂

import javax.swing.JOptionPane;

public class Main {
    public static void main(String[] args) {
        String fbb,rbb;
        //fbb=JoptionPane.ShowInputDialog("");
        JOptionPane.showConfirmDialog( null,"我的世界");
        JOptionPane.showInputDialog(null,"我的世界");
        JOptionPane.showMessageDialog(null,"我的世界");
        JOptionPane.showMessageDialog(null,"错误","提示",JOptionPane.ERROR_MESSAGE);//错误
        JOptionPane.showMessageDialog(null,"大错特错","小笨蛋",JOptionPane.INFORMATION_MESSAGE);//普通
        JOptionPane.showMessageDialog(null,"发动机过载","警告",JOptionPane.WARNING_MESSAGE);//警告
        JOptionPane.showMessageDialog(null,"您的爱人是谁","提问",JOptionPane.WARNING_MESSAGE);//提问
        JOptionPane.showMessageDialog(null,"她今年贵芳年","无图标",JOptionPane.PLAIN_MESSAGE);//不带图标

    }
}

 下面是我写的一个随机验证码小程序

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Random;

public class RandomGraphicVerificationCodeWithInput {
    private static final String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    private static final int codeLength = 6;
    private static String currentVerificationCode;

    public static void main(String[] args) {
        JFrame frame = new JFrame("随机验证码");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(300, 200);

        JPanel panel = new JPanel(new GridLayout(4, 1));
        frame.add(panel);

        JLabel codeLabel = new JLabel();
        panel.add(codeLabel);

        JTextField inputField = new JTextField();
        panel.add(inputField);

        JButton submitButton = new JButton("提交");
        panel.add(submitButton);

        JLabel hintLabel = new JLabel("请输入验证码");
        panel.add(hintLabel);

        generateAndSetVerificationCode(codeLabel);

        submitButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                String userInput = inputField.getText().trim();
                if (userInput.equals(currentVerificationCode)) {
                    JOptionPane.showMessageDialog(frame, "验证码正确!程序即将退出。");
                    System.exit(0);
                } else {
                    JOptionPane.showMessageDialog(frame, "验证码错误,请重新输入!", "错误", JOptionPane.ERROR_MESSAGE);
                    generateAndSetVerificationCode(codeLabel);
                }
                inputField.setText("");
            }
        });

        frame.setVisible(true);
    }

    public static void generateAndSetVerificationCode(JLabel codeLabel) {
        currentVerificationCode = generateVerificationCode(codeLength);
        codeLabel.setText("验证码: " + currentVerificationCode);
    }

    public static String generateVerificationCode(int length) {
        Random random = new Random();
        StringBuilder codeBuilder = new StringBuilder();

        for (int i = 0; i < length; i++) {
            int index = random.nextInt(characters.length());
            char randomChar = characters.charAt(index);
            codeBuilder.append(randomChar);
        }

        return codeBuilder.toString();
    }
}

密码如果输错就会重新刷新验证码

 再次输入

 密码正确程序自己退出

 下面是图形化界面JOptionPane的测试和使用

 1 // An addition program
 2 
 3 import javax.swing.JOptionPane;  // import class JOptionPane
 4 
 5 public class Addition {
 6     public static void main( String args[] )
 7     {
 8         String firstNumber,   // first string entered by user
 9                 secondNumber;  // second string entered by user
10         int number1,          // first number to add
11                 number2,          // second number to add
12                 sum;              // sum of number1 and number2
13 
14         // read in first number from user as a string
15         firstNumber =
16                 JOptionPane.showInputDialog( "Enter first integer" );
17 
18         // read in second number from user as a string
19         secondNumber =
20                 JOptionPane.showInputDialog( "Enter second integer" );
21 
22         // convert numbers from type String to type int
23         number1 = Integer.parseInt( firstNumber );
24         number2 = Integer.parseInt( secondNumber );
25 
26         // add the numbers
27         sum = number1 + number2;
28 
29         // display the results
30         JOptionPane.showMessageDialog(
31                 null, "The sum is " + sum, "Results",
32                 JOptionPane.PLAIN_MESSAGE );
33 
34         System.exit( 0 );   // terminate the program
35     }
36 }

 

 

 

 实现了两数相加的图形化界面,

import javax.swing.JOptionPane; 包的使用

枚举数的测试
  1. public enum Size{ SMALL, MEDIUM, LARGE, EXTRA_LARGE };
  2.  实际上,这个声明定义的类型是一个类,它刚好有四个实例,在此尽量不要构造新对象。
  3.  因此,在比较两个枚举类型的值时,永远不需要调用equals方法,而直接使用"=="就可以了
  4. Java Enum类型的语法结构尽管和java类的语法不一样,应该说差别比较大

例如:

public enum Size{ SMALL, MEDIUM, LARGE, EXTRA_LARGE };
public
enum WeekDay { Mon("Monday"), Tue("Tuesday"), Wed("Wednesday"), Thu("Thursday"), Fri( "Friday"), Sat("Saturday"), Sun("Sunday"); private final String day; private WeekDay(String day) { this.day = day; }

public static void printDay(int i){
switch(i){
case 1: System.out.println(WeekDay.Mon); break;
case 2: System.out.println(WeekDay.Tue);break;
case 3: System.out.println(WeekDay.Wed);break;
case 4: System.out.println(WeekDay.Thu);break;
case 5: System.out.println(WeekDay.Fri);break;
case 6: System.out.println(WeekDay.Sat);break;
case 7: System.out.println(WeekDay.Sun);break;
default:System.out.println("wrong number!");
                 }
          }
public String getDay() {
return day;
    }
}

 


使用 final 修饰方法的原因有两个。第一个原因把方法锁定,以防止集成修改他的含义。处于设计考虑 第二个就是效率问题。内嵌的方法有时候效率 偏高。final和private关键字


类中 所有的private 方法都隐士的指定为 final的 由于无法取用private 方法所以也就无法覆盖它。但是 private 方法添加上隐士的 final字也是可以的 编译器并不报错

 
下面是王建民老师的代码,我们仔细看看
 1 public class EnumTest {
 2 
 3     public static void main(String[] args) {
 4         Size s=Size.SMALL;
 5         Size t=Size.LARGE;
 6         //s和t引用同一个对象?
 7         System.out.println(s==t);  //false
 8         //是原始数据类型吗?
 9         System.out.println(s.getClass().isPrimitive());//false
10         //从字符串中转换
11         Size u=Size.valueOf("SMALL");
12         System.out.println(s==u);  //true
13         //列出它的所有值
14         for(Size value:Size.values()){
15             System.out.println(value);
16         }
17     }
18 
19 }
20 enum Size{SMALL,MEDIUM,LARGE};

1, 很明显引用的不是同一个对象

2,枚举类型不是基本类型数据

1 char
2 int
3 byte
4 short
5 long
6 float
7 double
8 boolean

3,是字符串类型,能直接用==号
4,依次打印枚举的所有值


输出格式-字符串拼接
/**
   @version 1.10 2004-02-10
   @author Cay Horstmann
*/

import java.util.*;

public class InputTest
{  
   public static void main(String[] args)
   {  
      Scanner in = new Scanner(System.in);

      // get first input
      System.out.print("What is your name? ");
      String name = in.nextLine();

      // get second input
      System.out.print("How old are you? ");
      int age = in.nextInt();
      
      
    /* int i;
     String value="100";
     i=Integer.parseInt(value);
     i=200;
     String s=String.valueOf(i);*/
     
      // display output on console
      System.out.println("Hello, " + name + ". Next year, you'll be " + (age + 1));
  
      
   }
}

 

随机数Random

public class RandomStr
{
    public static void main(String[] args) 
    {
        //定义一个空字符串
        String result = "";
        //进行6次循环
        for(int i = 0 ; i < 6 ; i ++)
        {
            //生成一个97~122的int型的整数
            int intVal = (int)(Math.random() * 26 + 97);
            //将intValue强制转换为char后连接到result后面
            result = result + (char)intVal;
        }
        //输出随机字符串
        System.out.println(result);
     }
}

 

 强转为字符输出6个字符,这就是随机字符,可用验证码里面

 

Switch语句的运用

// Drawing shapes
import java.awt.Graphics;
import javax.swing.*;

public class SwitchTest extends JApplet {
   int choice;   

   public void init()
   {
      String input;

      input = JOptionPane.showInputDialog( 
                 "Enter 1 to draw lines\n" +
                 "Enter 2 to draw rectangles\n" +
                 "Enter 3 to draw ovals\n" );

      choice = Integer.parseInt( input );
   }

   public void paint( Graphics g )
   {
      for ( int i = 0; i < 10; i++ ) { 
         switch( choice ) {
            case 1:
               g.drawLine( 10, 10, 250, 10 + i * 10 );
               break;
            case 2:
               g.drawRect( 10 + i * 10, 10 + i * 10,
                           50 + i * 10, 50 + i * 10 );
               break;
            case 3:
               g.drawOval( 10 + i * 10, 10 + i * 10,
                           50 + i * 10, 50 + i * 10 );
               break;
            default:
               JOptionPane.showMessageDialog(
                  null, "Invalid value entered" );
         } // end switch
      } // end for
   } // end paint()
} // end class SwitchTest

/**************************************************************************
 * (C) Copyright 1999 by Deitel & Associates, Inc. and Prentice Hall.     *
 * All Rights Reserved.                                                   *
 *                                                                        *
 * DISCLAIMER: The authors and publisher of this book have used their     *
 * best efforts in preparing the book. These efforts include the          *
 * development, research, and testing of the theories and programs        *
 * to determine their effectiveness. The authors and publisher make       *
 * no warranty of any kind, expressed or implied, with regard to these    *
 * programs or to the documentation contained in these books. The authors *
 * and publisher shall not be liable in any event for incidental or       *
 * consequential damages in connection with, or arising out of, the       *
 * furnishing, performance, or use of these programs.                     *
 *************************************************************************/

 

import java.math.BigDecimal;

public class TestBigDecimal
{
    public static void main(String[] args) 
    {
        BigDecimal f1 = new BigDecimal("0.05");
        BigDecimal f2 = BigDecimal.valueOf(0.01);
        BigDecimal f3 = new BigDecimal(0.05);
        System.out.println("下面使用String作为BigDecimal构造器参数的计算结果:");
        System.out.println("0.05 + 0.01 = " + f1.add(f2));
        System.out.println("0.05 - 0.01 = " + f1.subtract(f2));
        System.out.println("0.05 * 0.01 = " + f1.multiply(f2));
        System.out.println("0.05 / 0.01 = " + f1.divide(f2));
        System.out.println("下面使用double作为BigDecimal构造器参数的计算结果:");
        System.out.println("0.05 + 0.01 = " + f3.add(f2));
        System.out.println("0.05 - 0.01 = " + f3.subtract(f2));
        System.out.println("0.05 * 0.01 = " + f3.multiply(f2));
        System.out.println("0.05 / 0.01 = " + f3.divide(f2));
    }
}

先转化为String 类型

 

 字符串连接优先级

public class EnumTest {

    public static void main(String args[]) {
        System.out.println("0.05 + 0.01 = " + (0.05 + 0.01));
        System.out.println("1.0 - 0.42 = " + (1.0 - 0.42));
        System.out.println("4.015 * 100 = " + (4.015 * 100));
        System.out.println("123.3 / 100 = " + (123.3 / 100));
    }
}

 

 1 import java.util.Scanner;
  2 
  3 public class viovo {
  4     static int number = 5;//五个商品信息
  5     static  oppo[] s = new  oppo[50];
  6 
  7     public static void main(String[] args) {
  8 
  9         Scanner ab = new Scanner(System.in);
 10         for(int i=0;i<s.length;i++)
 11         {
 12             s[i]=new oppo();//初始化
 13         }
 14         while (true) {
 15             menu();
 16             int choose = ab.nextInt();
 17             switch (choose) {
 18                 case 1:
 19                     input();
 20                     break;
 21                 case 2:
 22                     change();
 23                     break;
 24                 case 3:
 25                     output();
 26                     break;
 27                 case 4:
 28                     pan();
 29                     break;
 30             }
 31         }
 32 
 33     }
 34 
 35 
 36     public static void menu() {/*主菜单*/
 37         System.out.println("***********************************************************");
 38         System.out.println("             石家庄铁道大学前进22软件开发有限公司");
 39         System.out.println("                    仓库管理系统2022版");
 40         System.out.println("***********************************************************");
 41         System.out.println("                     1、商品入库管理");
 42         System.out.println("                     2、商品信息修改");
 43         System.out.println("                     3、商品出库管理");
 44         System.out.println("                     4、仓库盘点管理");
 45         System.out.println("***********************************************************");
 46     }
 47 
 48 
 49     public static void input() {/*商品入库*/
 50         String YN;
 51         int i=0;
 52         int flag = 0;
 53         Scanner sc = new Scanner(System.in);
 54         String itemno0="";                //商品编号8
 55         String itemname0="";              //商品名称
 56         String suppliername0="";          //供货商名称
 57         String warehousingtime0="";       //入库时间8
 58         String warehousenumber0="";       //仓库编号3
 59         String warehouseplace0="";        //商品具体位置XXXXYYZZ
 60         int itemnumber0=0;                //入库商品的数量。
 61 
 62 
 63         while (true) {
 64             System.out.println("***********************************************************");
 65             System.out.println("             石家庄铁道大学前进22软件开发有限公司");
 66             System.out.println("                    仓库管理系统2022版");
 67             System.out.println("***********************************************************");
 68 
 69             Scanner sb=new Scanner(System.in);
 70             int fllag=1;
 71             while(fllag==1){
 72                 System.out.println("请输入商品编号");
 73                 itemno0=sb.nextLine();
 74                 if(itemno0.length()!=8) System.out.println("格式错误,请输入八位有效数字");
 75                 else fllag=0;
 76             }
 77 
 78             System.out.println("请输入商品名称");
 79             itemname0=sb.nextLine();
 80 
 81             System.out.println("请输入供货商名称");
 82             suppliername0=sb.nextLine();
 83 
 84 
 85             int flag1=1;
 86             while(flag1==1){
 87                 System.out.println("请输入入库时间");
 88                 warehousingtime0=sb.nextLine();
 89                 if(warehousingtime0.length()!=8) System.out.println("格式错误,请输入八位有效数字");
 90                 else flag1=0;
 91             }
 92 
 93             int flag2=1;
 94             while(flag2==1){
 95                 System.out.println("请输入仓库号");
 96                 warehousenumber0=sb.nextLine();
 97                 if(warehousenumber0.length()!=3) System.out.println("格式错误,请输入3位有效数字");
 98                 else flag2=0;
 99             }
100 
101             int flag3=1;
102             while(flag3==1){
103                 System.out.println("请输入商品具体位置");
104                 warehouseplace0=sb.nextLine();
105                 if(warehouseplace0.length()!=8) System.out.println("格式错误,请输入8位有效数字");
106                 else flag3=0;
107             }
108             System.out.println("请输入入库商品的数量");
109             Scanner ab=new Scanner(System.in);
110             itemnumber0=ab.nextInt();
111 
112 
113             System.out.println("**********************************************************");
114 
115             if (flag == 1) {
116                 System.out.println("**********************************************************");
117                 System.out.println("             石家庄铁道大学前进22软件开发有限公司");
118                 System.out.println("                    仓库管理系统2022版");
119                 System.out.println("***********************************************************");
120                 System.out.println("                    商品编号:" + itemno0);
121                 System.out.println("                    商品名称:" + itemname0);
122                 System.out.println("                    供货商信息:" + suppliername0);
123                 System.out.println("                    入库时间:" + warehousingtime0);
124                 System.out.println("                    存放仓库号:" + warehousenumber0);
125                 System.out.println("                    存放位置信息:" + warehouseplace0);
126                 System.out.println("                     入库商品数量:" + itemnumber0);
127                 System.out.println("该商品入库操作已完成,是否提交(Y/N)");
128                 YN = sc.next();
129                 if (YN.equals("Y")) {
130                     s[i].setItemno(itemno0);
131                     s[i].setItemname(itemname0);
132                     s[i].setSuppliername(suppliername0);
133                     s[i].setWarehousingtime(warehousingtime0);
134                     s[i].setWarehousenumber(warehousenumber0);
135                     s[i].setWarehouseplace(warehouseplace0);
136                     s[i].setItemnumber(s[i].getItemnumber() + itemnumber0);
137                     break;
138                 } else {
139                     continue;
140                 }
141             } else {
142                 System.out.println("**********************************************************");
143                 System.out.println("             石家庄铁道大学前进22软件开发有限公司");
144                 System.out.println("                    仓库管理系统2022版");
145                 System.out.println("***********************************************************");
146                 System.out.println("                    商品编号:" + itemno0);
147                 System.out.println("                    商品名称:" + itemname0);
148                 System.out.println("                    供货商信息:" + suppliername0);
149                 System.out.println("                    入库时间:" + warehousingtime0);
150                 System.out.println("                    存放仓库号:" + warehousenumber0);
151                 System.out.println("                    存放位置信息:" + warehouseplace0);
152                 System.out.println("                     入库商品数量:" + itemnumber0);
153                 System.out.println("该商品入库操作已完成,是否提交(Y/N)");
154                 YN = sc.next();
155                 if (YN.equals("Y")) {
156                     s[i].setItemno(itemno0);
157                     s[i].setItemname(itemname0);
158                     s[i].setSuppliername(suppliername0);
159                     s[i].setWarehousingtime(warehousingtime0);
160                     s[i].setWarehousenumber(warehousenumber0);
161                     s[i].setWarehouseplace(warehouseplace0);
162                     s[i].setItemnumber(itemnumber0);
163                     number++;
164                     break;
165                 } else {
166                     continue;
167                 }
168             }
169         }
170     }
171 
172     public static void change() {
173         Scanner sc = new Scanner(System.in);
174         System.out.println("**********************************************************");
175         System.out.println("             石家庄铁道大学前进22软件开发有限公司");
176         System.out.println("                    仓库管理系统2022版");
177         System.out.println("***********************************************************");
178         System.out.print("请输入商品编号:");
179         String itemno1 = sc.next();
180         System.out.println("**********************************************************");
181         for (int j = 0; j < s.length; j++) {
182             if (itemno1.equals(s[j].getItemno())) {
183                 show(j);
184                 System.out.print("请选择需要修改的信息编号(1-7):");
185                 int choose0 = sc.nextInt();
186                 System.out.println("***********************************************************");
187                 if (choose0 < 1 || choose0 > 7) {
188                     System.out.println("不存在");
189                     break;
190                 } else if (choose0 == 1) {
191                     show(j);
192                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
193                     System.out.print("请输入修改后的商品编号:");
194                     String itemno2 = sc.next();
195                     System.out.println("***********************************************************");
196                     System.out.println("Y/N");
197                     String YN1 = sc.next();
198                     if (YN1.equals("Y"))
199                        s[j].setItemno(itemno2);
200                     else break;
201                 } else if (choose0 == 2) {
202                     show(j);
203                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
204                     System.out.print("请输入修改后的商品名称:");
205                     String itemname2 = sc.next();
206                     System.out.println("***********************************************************");
207                     System.out.println("Y/N");
208                     String YN1 = sc.next();
209                     if (YN1.equals("Y"))
210                         s[j].setItemname(itemname2);
211                     else break;
212                 } else if (choose0 == 3) {
213                     show(j);
214                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
215                     System.out.print("请输入修改后的供货商信息:");
216                     String suppliername2 = sc.next();
217                     System.out.println("***********************************************************");
218                     System.out.println("Y/N");
219                     String YN1 = sc.next();
220                     if (YN1.equals("Y"))
221                         s[j].setSuppliername(suppliername2);
222                     else break;
223                 } else if (choose0 == 4) {
224                     show(j);
225                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
226                     System.out.print("请输入修改后的入库时间:");
227                     String warehousingtime2 = sc.next();
228                     System.out.println("***********************************************************");
229                     System.out.println("Y/N");
230                     String YN1 = sc.next();
231                     if (YN1.equals("Y"))
232                         s[j].setWarehousingtime(warehousingtime2);
233                     else break;
234                 } else if (choose0 == 5) {
235                     show(j);
236                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
237                     System.out.print("请输入修改后的存放仓库号:");
238                     String wps = sc.next();
239                     System.out.println("***********************************************************");
240                     System.out.println("Y/N");
241                     String pp = sc.next();
242                     if (pp.equals("Y"))
243                        s[j].setWarehousenumber(wps);
244                     else break;
245                 } else if (choose0 == 6) {
246                     show(j);
247                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
248                     System.out.print("请输入修改后的存放位置信息:");
249                     String warehouseplace2 = sc.next();
250                     System.out.println("***********************************************************");
251                     System.out.println("Y/N");
252                     String YN1 = sc.next();
253                     if (YN1.equals("Y"))
254                         s[j].setWarehouseplace(warehouseplace2);
255                     else break;
256                 } else  {
257                     show(j);
258                     System.out.println("请选择需要修改的信息编号(1-7):" + choose0);
259                     System.out.print("请输入修改后的入库商品数量:");
260                     int itemnumber2 = sc.nextInt();
261                     System.out.println("***********************************************************");
262                     System.out.println("Y/N");
263                     String YN1 = sc.next();
264                     if (YN1.equals("Y"))
265                         s[j].setItemnumber(itemnumber2);
266                     else break;
267                 }
268             } else {
269                 //System.out.println("没有找到商品");
270                continue;
271             }
272         }
273     }
274 
275     public static void output() {
276         Scanner sc = new Scanner(System.in);
277         System.out.println("**********************************************************");
278         System.out.println("             石家庄铁道大学前进22软件开发有限公司");
279         System.out.println("                    仓库管理系统2022版");
280         System.out.println("***********************************************************");
281         System.out.print("请输入商品编号:");
282         String itemno3 = sc.next();
283         System.out.println("**********************************************************");
284         for (int j = 0; j <s.length; j++) {
285             if (itemno3.equals(s[j].getItemno())) {
286                 show(j);
287                 System.out.print("出库时间:");
288                 String chukutime=sc.next();
289                 System.out.print("出库数量:");
290                 int chukunumber=sc.nextInt();
291                 System.out.println("Y/N");
292                 String YN4= sc.next();
293                 if(YN4.equals("Y")){
294                     s[j].setShipmenttime(chukutime);
295                     s[j].setOutnumber(chukunumber);
296                     break;
297                 }
298                 else continue;
299             }
300             else {
301                 System.out.println("库中没有该商品");
302                 continue;
303             }
304         }
305     }
306     public static void pan(){
307         Scanner ab=new Scanner(System.in);
308         System.out.println("**********************************************************");
309         System.out.println("             石家庄铁道大学前进22软件开发有限公司");
310         System.out.println("                    仓库管理系统2022版");
311         System.out.println("***********************************************************");
312         for(int i=0;i<number;i++){
313             System.out.println((i+1)+"商品编号:"+s[i].getItemno()+"商品名称:"+s[i].getItemname()+"库存数量:"+(s[i].getItemnumber()-s[i].getOutnumber()));
314         }
315     }
316 
317     public static void show(int j){
318         System.out.println("**********************************************************");
319         System.out.println("             石家庄铁道大学前进22软件开发有限公司");
320         System.out.println("                    仓库管理系统2022版");
321         System.out.println("***********************************************************");
322         System.out.println("                    1、商品编号:" + s[j].getItemno());
323         System.out.println("                    2、商品名称:" + s[j].getItemname());
324         System.out.println("                    3、供货商信息:" + s[j].getSuppliername());
325         System.out.println("                    4、入库时间:" + s[j].getWarehousingtime());
326         System.out.println("                    5、存放仓库号:" + s[j].getWarehousenumber());
327         System.out.println("                    6、存放位置信息:" + s[j].getWarehouseplace());
328         System.out.println("                    7、入库商品数量:" + s[j].getItemnumber());
329 
330     }
331 
332 }
复制代码

类在下面

复制代码
 1 public class oppo {
 2     private String itemno;               //商品编号8
 3     private String itemname;             //商品名称
 4     private String suppliername;         //供货商名称
 5     private String warehousingtime;      //入库时间8
 6     private String shipmenttime;         //出库时间8
 7     private String warehousenumber;      //仓库编号3
 8     private String warehouseplace;       //商品具体位置XXXXYYZZ
 9     private int itemnumber;              //入库商品的数量。
10     private int outnumber;               //表示出库商品的数量
11     public  oppo(){
12     }
13     public  oppo(String itemno,String itemname,String suppliername,String warehousingtime,String shipmenttime,String warehousenumber,String warehouseplace,int itemnumber,int outnumber)
14     {this.itemno=itemno;
15         this.outnumber=outnumber;
16         this.itemname=itemname;
17         this.itemno=itemno;
18         this.warehousenumber=warehousenumber;
19         this.warehouseplace=warehouseplace;
20         this.warehousingtime=warehousingtime;
21         this.suppliername=suppliername;
22         this.shipmenttime=shipmenttime;
23         this.itemnumber=itemnumber;
24     }
25 
26     public String getItemno() {
27         return itemno;
28     }
29 
30     public void setItemno(String itemno) {
31         this.itemno = itemno;
32     }
33 
34     public String getItemname() {
35         return itemname;
36     }
37 
38     public void setItemname(String itemname) {
39         this.itemname = itemname;
40     }
41 
42     public String getSuppliername() {
43         return suppliername;
44     }
45 
46     public void setSuppliername(String suppliername) {
47         this.suppliername = suppliername;
48     }
49 
50     public String getWarehousingtime() {
51         return warehousingtime;
52     }
53 
54     public void setWarehousingtime(String warehousingtime) {
55         this.warehousingtime = warehousingtime;
56     }
57 
58     public String getShipmenttime() {
59         return shipmenttime;
60     }
61 
62     public void setShipmenttime(String shipmenttime) {
63         this.shipmenttime = shipmenttime;
64     }
65 
66     public String getWarehousenumber() {
67         return warehousenumber;
68     }
69 
70     public void setWarehousenumber(String warehousenumber) {
71         this.warehousenumber = warehousenumber;
72     }
73 
74     public String getWarehouseplace() {
75         return warehouseplace;
76     }
77 
78     public void setWarehouseplace(String warehouseplace) {
79         this.warehouseplace = warehouseplace;
80     }
81 
82     public int getItemnumber() {
83         return itemnumber;
84     }
85 
86     public void setItemnumber(int itemnumber) {
87         this.itemnumber = itemnumber;
88     }
89 
90     public int getOutnumber() {
91         return outnumber;
92     }
93 
94     public void setOutnumber(int outnumber) {
95         this.outnumber = outnumber;
96     }
97 }



 
posted @ 2023-09-13 23:40  软件拓荒人  阅读(30)  评论(0)    收藏  举报