當前位置:首頁 » 編程語言 » 超市java代碼

超市java代碼

發布時間: 2022-04-30 00:58:55

Ⅰ 簡單超市收銀java代碼

可選中1個或多個下面的關鍵詞,搜索相關資料。也可直接點「搜索資料」搜索整個問題。

  • 超市
  • java
  • 代碼

Ⅱ 超市的java代碼,高手們幫幫忙啊(要全的)

超市系統完整代碼我有,是我前幾天做完的.我的畢業設計.加點分兄弟.合適的話,在我的博客上留言.多夠200分,馬上給你傳.決無虛言.

這是版權好不好啊.我做出來那個東西也不容易啊.對吧老兄!

Ⅲ 超市JAVA代碼,高手進,要自己編的,不要網上下的謝謝!!!!!!!!!

呵呵,我有個jcreator+mssql的,做的不是特完善,但應付畢業設計之類的應該沒問題

Ⅳ 用java編程實現網上超市購物結算功能代碼

哎,我還是自己代碼黏貼給你吧!免得總通不過!裝不下這么多字,詳情自己找我。 連接資料庫類(添加修改會員信息) package com.to.java; import java.util.Scanner; import java.sql.*; public class Vds { Scanner Input=new Scanner(System.in); ZhuCK1 zhuck1=new ZhuCK1(); public void x(){ try{ Connection con=null; Statement stmt=null; ResultSet rs=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String ur1="jdbc:odbc:gg"; con=DriverManager.getConnection(ur1); stmt=con.createStatement(); String sqlstmt="select id,mm from gg"; rs=stmt.executeQuery(sqlstmt); System.out.println("----------查詢結果---------"); System.out.println(); System.out.println("會員號--密碼"); while(rs.next()){ String id=rs.getString("id"); String mm=rs.getString("mm"); System.out.println(id+" "+mm); } con.close(); stmt.close(); }catch(Exception e){ System.out.println(e);} System.out.println("是否返回上級菜單"); System.out.println("1.是"); System.out.println("2.否"); int m=Input.nextInt(); switch(m){ case 1: zhuck1.ZhucK1(); break; case 2: { System.out.println("歡迎下次再次使用");System.exit(-1);}; break; }} public void j(){ try{ Connection con=null; Statement stmt=null; ResultSet rs=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String ur1="jdbc:odbc:gg"; con=DriverManager.getConnection(ur1); stmt=con.createStatement(); String sqlstmt="select id,mm from gg"; rs=stmt.executeQuery(sqlstmt); while(rs.next()){ String id=rs.getString("id"); String mm=rs.getString("mm"); System.out.println(id+" "+mm); } Scanner input=new Scanner(System.in); System.out.println("請輸入會員信息:"); System.out.println("請輸入會員號:"); String f=input.next(); System.out.println("請輸入密碼:"); String q=input.next(); String sqlst="insert into gg values('"+f+"','"+q+"')"; Statement tatement=con.createStatement(); int result=tatement.executeUpdate(sqlst); System.out.println("操作成功!"); con.close(); stmt.close(); }catch(Exception e){ System.out.println(e); } System.out.println("是否返回上級菜單"); System.out.println("1.是"); System.out.println("2.否"); int m=Input.nextInt(); switch(m){ case 1: zhuck1.ZhucK1(); break; case 2: { System.out.println("歡迎下次再次使用");System.exit(-1);}; break; } } public void xg(){ try{ Connection con=null; Statement stmt=null; ResultSet rs=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String ur1="jdbc:odbc:gg"; con=DriverManager.getConnection(ur1); stmt=con.createStatement(); String sqlstmt="select id,mm from gg"; rs=stmt.executeQuery(sqlstmt); while(rs.next()){ String id=rs.getString("id"); String mm=rs.getString("mm"); System.out.println(id+" "+mm); } Scanner input=new Scanner(System.in); System.out.println("請輸入會員信息:"); System.out.println("請輸入要修改的會員號:"); String f=input.next(); System.out.println("請輸入修改的密碼:"); String q=input.next(); String sqlst="update gg set mm='"+q+"' where id='"+f+"'"; Statement tatement=con.createStatement(); int result=tatement.executeUpdate(sqlst); System.out.println("操作成功!"); con.close(); stmt.close(); }catch(Exception e){ System.out.println(e); } System.out.println("是否返回上級菜單"); System.out.println("1.是"); System.out.println("2.否"); int m=Input.nextInt(); switch(m){ case 1: zhuck1.ZhucK1(); break; case 2: { System.out.println("歡迎下次再次使用");System.exit(-1);}; break; } } } package com.to.java; import java.util.Scanner; public class KeHu { Vds sj=new Vds(); public void kehu1(){ Scanner Input=new Scanner(System.in); ZhuCK1 zhuck1=new ZhuCK1(); System.out.println("******************************************************"+"\n\n"); System.out.println("1.顯示所有客戶信息"); System.out.println("2.添加客戶信息"); System.out.println("3.修改客戶信息"); System.out.println("4.查詢客戶信息"); System.out.println("5.返回上級菜單"); System.out.println("******************************************************"+"\n\n"); System.out.println("請輸入數字:"); int a=Input.nextInt(); switch(a){ case 1: sj.x(); break; case 2: sj.j(); break; case 3: sj.xg(); break; case 4: sj.x();break; case 5: zhuck1.ZhucK1();break; } } } package com.to.java; public class GouWuXiTong { public static void main(String[] args){ ZhuCK zhuck=new ZhuCK(); zhuck.ZhucK(); } } package com.to.java; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.Scanner; public class ZhuCK { Scanner Input=new Scanner(System.in); public void ZhucK(){ ZhuCK1 zhuck1=new ZhuCK1(); System.out.println("\t\t"+"歡迎使用我心我素購物系統"); System.out.println("******************************************************"+"\n\n"); System.out.println("\t\t"+"1.登陸系統"); System.out.println(); System.out.println("\t\t"+"2.退出"+"\n\n"); System.out.println("******************************************************"); int d=1; while(d!=2){ System.out.println("請輸入會員號:"); String p=Input.next(); System.out.println("請輸入密碼:"); String f=Input.next(); try{ Connection con=null; Statement stmt=null; ResultSet rs=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String ur1="jdbc:odbc:gg"; con=DriverManager.getConnection(ur1); stmt=con.createStatement(); String sqlstmt="select * from gg"; rs=stmt.executeQuery(sqlstmt); while(rs.next()){ String id=rs.getString("id"); String mm=rs.getString("mm"); if(id.equals(p)&&mm.equals(f)){ { System.out.println("請輸入數字:"); int a=Input.nextInt(); switch(a){ case 1: zhuck1.ZhucK1(); break; case 2: break; }d=2; } } } }catch(Exception e){ System.out.println(e);} {System.out.println("輸入錯誤請再次輸入:");d=1;} } }} }

Ⅳ 求一份超市收銀系統java代碼,謝謝了

給錢嗎?給錢我幫你做
不給錢的話,有這種好事我也想在這里問一下,我想要qq的源代碼,想要Facebook源代碼,想要Windows的源代碼,誰能給一下。

Ⅵ java超市管理系統源代碼

只寫個demo級的常式很好寫,但用到生產環境中還得具體分析設計再編碼。這種代碼網上太多了內,你隨便搜下就有了。

Ⅶ java超市計價系統代碼

packageentity;


publicclassMarket{

privateintid;//id

privateintnum;//數量

privateStringgoods;//商品

privatedoubleprice;//價格


publicMarket(intid,intnum,Stringgoods,doubleprice){
super();
this.id=id;
this.num=num;
this.goods=goods;
this.price=price;
}

publicintgetId(){
returnid;
}


publicvoidsetId(intid){
this.id=id;
}


publicintgetNum(){
returnnum;
}


publicvoidsetNum(intnum){
this.num=num;
}


publicStringgetGoods(){
returngoods;
}


publicvoidsetGoods(Stringgoods){
this.goods=goods;
} publicdoublegetPrice(){
returnprice;
}


publicvoidsetPrice(doubleprice){
this.price=price;
}


publicdoublecalc(){

doublesum=price*num;

System.out.println("您消費共計:"+sum+"¥");

returnsum;

}

}
packagetest;

importjava.util.HashMap;
importjava.util.Map;
importjava.util.Scanner;

importentity.Market;


publicclassTest{

privatestaticMap<Integer,Market>goods=newHashMap<Integer,Market>();

publicstaticvoidmain(String[]args){

System.out.println("-------超市計價系統-------");

Stringgoods1="可口可樂";
Stringgoods2="爆米花";
Stringgoods3="益達";

printTable("編號","商品","價格");
printTable("1",goods1,"3.0¥");
printTable("2",goods2,"5.0¥");
printTable("3",goods3,"10.0¥");

goods.put(1,newMarket(1,1,goods1,3.0));

goods.put(2,newMarket(2,1,goods2,5.0));

goods.put(3,newMarket(3,1,goods3,10.0));

Scannerinput=newScanner(System.in);

System.out.println("請輸入商品的編號:");

intnum=input.nextInt();

System.out.println("請輸入商品的數量");

intamount=input.nextInt();

Marketmarket=goods.get(num);

market.setNum(amount);

market.calc();

}

privatestaticvoidprintTable(Stringrow1,Stringrow2,Stringrow3){

System.out.print(row1);

inttimes=12;

if(row2!="商品"){

times=5;

}

for(inti=0;i<times;i++){

System.out.print("");

}

System.out.print(row2);

for(inti=0;i<10;i++){

System.out.print("");

}

System.out.print(row3);

System.out.println(" ");

}

}
//測試結果:
-------超市計價系統-------
編號商品價格

1可口可樂3.0¥

2爆米花5.0¥

3益達10.0¥

請輸入商品的編號:
3
請輸入商品的數量
5
您消費共計:50.0¥

Ⅷ 求Java超市管理系統代碼(急)

那很簡單啊,界面用dreamweaver直接做就行 ,代碼就是JAVA訪問資料庫,就那幾行

Ⅸ 用於超市結算的java代碼

我大學時候交作業用的,有不明白的hi我

Ⅹ java超市系統源代碼

Stringqq="97163017";

熱點內容
南崗法院伺服器ip地址 發布:2025-05-15 07:46:02 瀏覽:286
實況如何退出賬號安卓 發布:2025-05-15 07:45:56 瀏覽:917
深入編譯器 發布:2025-05-15 07:41:35 瀏覽:878
電信手機號服務密碼怎麼查 發布:2025-05-15 07:40:10 瀏覽:613
python全局變數文件 發布:2025-05-15 07:35:06 瀏覽:954
位元組和存儲位元組 發布:2025-05-15 07:32:10 瀏覽:521
linux應用開發工程師 發布:2025-05-15 07:32:07 瀏覽:261
sqldcl 發布:2025-05-15 07:29:18 瀏覽:199
canvas的圖像上傳 發布:2025-05-15 07:29:17 瀏覽:102
離線緩存為什麼點不動 發布:2025-05-15 07:27:17 瀏覽:829