• 大小: 4KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-25
  • 语言: 其他
  • 标签: Java  面向对象  

资源简介

这是一个简易的咖啡馆系统,通过与用户交互的操作实现一个咖啡馆收银、买卖的运作。

资源截图

代码片段和文件信息

package ϵͳ;
import java.util.*;
public class Catalog {
static private Coffee C001=new Coffee(“C001““ColombiaWhole1 lb“17.99“Colomabia““Medium““Rich and Hearty““Rich““Medium““Full“);
static private Coffee C002=new Coffee(“C002““ColombiaGround1 lb“18.75“Colombia““Medium““Rich and Hearty““Rich““Medium““Full“);
static private Coffee C007=new Coffee(“C007““GuatemalaWhole1 lb“17.99“Guatrmala““Medium““Rich and complex““Spicy““Medium to high““Medium to full“);
static private Coffee C008=new Coffee(“C008““GuatemalaGround1 lb“18.75“Guatemale““Medium““Rich and complex““Spicy““Medium to high““Medium to full“);
static private Coffee_Brewer B001=new Coffee_Brewer(“B001““Home Coffee Brewer“150.00“Brewer 100““Pourover“6);
static private Coffee_Brewer B002=new Coffee_Brewer(“B002““Coffee Brewer2 Warmers“200.00“Brewer 200““Pourover“12);
static private Coffee_Brewer B003=new Coffee_Brewer(“B003““Coffee Brewer3 Warmers“280.00“Brewer 210““Pourover“12);
static private Coffee_Brewer B004=new Coffee_Brewer(“B004““Commercial Brewer20 cups“380.00“Quick Coffee 100““Automatic“20);
static private Coffee_Brewer B005=new Coffee_Brewer(“B005““Commercial Brewer40 cups“480.00“Quick Coffee 200““Automaric“40);
static private Coffee_Accessory A001=new Coffee_Accessory(“A001““Almond Flavored Syrup“9.00);
static private Coffee_Accessory A002=new Coffee_Accessory(“A002““Irish Creme Flavored Syrup“9.00);
static private Coffee_Accessory A005=new Coffee_Accessory(“A005““Gourmet Coffee Cookies“12.00);
static private Coffee_Accessory A007=new Coffee_Accessory(“A007““Gourmet Coffee Ceramic Mug“8.00);
static private Coffee_Accessory A009=new Coffee_Accessory(“A009““Gourmet Coffee 36 Cup Filters“45.00);
static private ArrayList product=new ArrayList();
static String productCode[]= {C001.getCode()C002.getCode()C007.getCode()C008.getCode()B001.getCode()B002.getCode()
         B003.getCode()B004.getCode()B005.getCode()A001.getCode()A002.getCode()A005.getCode()A007.getCode()A009.getCode()};
    public Catalog() {
     product.add(C001);
     product.add(C002);
     product.add(C007);
     product.add(C008);
     product.add(B001);
     product.add(B002);
     product.add(B003);
     product.add(B004);
     product.add(B005);
     product.add(A001);
     product.add(A002);
     product.add(A005);
     product.add(A007);
     product.add(A009);

    }
    static void show() {
     C001.display();
     C002.display();
     C007.display();
     C008.display();
     B001.display();
     B002.display();
     B003.display();
     B004.display();
     B005.display();
     A001.display();
     A002.display();
     A005.display();
     A007.display();
     A009.display();
    }
    static Coffee kind0(int i) {
return (Coffee)product.get(i);
}
static Coffee_Brewer kind1(int i) {
return (Coffee_Brewer)product.get(i);
}
static Coffee_Ac

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        611  2019-05-31 00:56  Coffee_Accessory.java

     文件        981  2019-05-31 00:56  Coffee_Brewer.java

     文件       2102  2019-05-31 00:56  Gourmet_Coffee_System.java

     文件        673  2019-05-31 00:56  Old_Orders.java

     文件       2955  2019-05-31 10:46  Order.java

     文件         43  2019-06-07 22:36  test.java

     文件       3077  2019-05-31 00:56  Catalog.java

     文件       1198  2019-05-31 00:56  Coffee.java

----------- ---------  ---------- -----  ----

                11640                    8


评论

共有 条评论