资源简介

基于java socket 编写的超市管理系统,无数据库技术,实现库管,收银员,普通顾客、会员结账功能!

资源截图

代码片段和文件信息

package org.wen.client;

import java.util.Scanner;

import org.wen.entity.User;
import org.wen.until.SysConstants;
import org.wen.until.Data;



/**
 * 客户端类
 */
public class Client {
static Scanner scanner = new Scanner(System.in);
static MoneyReceiverViewer moneyReceiverViewer = new MoneyReceiverViewer();
static RepertoryView repertoryView = new RepertoryView();
static ClientBIZ clientBIZ=ClientBIZimpl.getInstance();

public static void main(String[] args) {
// 调用登陆界面的方法
showMainMenuView();
}

/**
 * 登陆的方法
 */
private static void showMainMenuView() {
System.out.println(“***********欢迎使用青鸟超市管理系统**************“);
System.out.println(“1.登陆\n“ + “2.退出系统“);
System.out.println(“***************请选择数字1/2*********************“);
// 接受用户输入
int c = scanner.nextInt();
if (c == 1) {// 调用登陆的方法
showLoginView();
} else {
System.out.println(“谢谢使用!“);
clientBIZ.logout();
System.exit(0);
}

}

private static void showLoginView() {
System.out.print(“用户名称:“);
String name = scanner.next();
System.out.print(“用户密码:“);
String password = scanner.next();

Data dats = clientBIZ.dologin(name password);

if (!SysConstants.succ.equals(dats.getFlag())) {

System.out.println(“用户名或密码错误!登陆失败!“);

showLoginView();
} else {
User user = (User) dats.getDat();

if (SysConstants.repertory.equals(user.getRole())) {

repertoryView.showMainMenuView();
} else {
moneyReceiverViewer.setUser(user);
moneyReceiverViewer.showMainViewView();
}

}

}

}

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

     文件        301  2012-07-30 12:19  SupermarketCash\.classpath

     文件        391  2012-10-27 16:25  SupermarketCash\.project

     文件        629  2012-07-30 12:19  SupermarketCash\.settings\org.eclipse.jdt.core.prefs

     文件       2600  2012-10-27 16:27  SupermarketCash\bin\org\wen\client\Client.class

     文件        586  2012-10-27 16:26  SupermarketCash\bin\org\wen\client\ClientBIZ.class

     文件       6928  2012-10-27 16:35  SupermarketCash\bin\org\wen\client\ClientBIZimpl.class

     文件       8375  2012-10-27 16:27  SupermarketCash\bin\org\wen\client\MoneyReceiverViewer.class

     文件       4676  2012-10-27 16:34  SupermarketCash\bin\org\wen\client\RepertoryView.class

     文件       1819  2012-10-27 16:25  SupermarketCash\bin\org\wen\entity\Goods.class

     文件       1396  2012-10-27 16:25  SupermarketCash\bin\org\wen\entity\Order.class

     文件       1129  2012-10-27 16:25  SupermarketCash\bin\org\wen\entity\User.class

     文件        691  2012-10-27 16:25  SupermarketCash\bin\org\wen\entity\Vip.class

     文件       1276  2012-10-27 16:27  SupermarketCash\bin\org\wen\server\Server.class

     文件       4296  2012-10-27 16:45  SupermarketCash\bin\org\wen\server\ServerBiz.class

     文件       4568  2012-10-27 16:27  SupermarketCash\bin\org\wen\server\ServerService.class

     文件        790  2012-10-27 16:26  SupermarketCash\bin\org\wen\until\Data.class

     文件        917  2012-10-27 16:27  SupermarketCash\bin\org\wen\until\SysConstants.class

     文件        992  2012-10-27 16:55  SupermarketCash\bin\org\wen\until\Tools.class

     文件         25  2012-07-25 16:20  SupermarketCash\bin\sys.properties

     文件       1673  2012-10-27 16:27  SupermarketCash\src\org\wen\client\Client.java

     文件        893  2012-10-27 16:26  SupermarketCash\src\org\wen\client\ClientBIZ.java

     文件       7723  2012-10-27 16:35  SupermarketCash\src\org\wen\client\ClientBIZimpl.java

     文件       7034  2012-10-27 16:27  SupermarketCash\src\org\wen\client\MoneyReceiverViewer.java

     文件       4035  2012-10-27 16:34  SupermarketCash\src\org\wen\client\RepertoryView.java

     文件       1231  2012-10-27 16:25  SupermarketCash\src\org\wen\entity\Goods.java

     文件        716  2012-10-27 16:25  SupermarketCash\src\org\wen\entity\Order.java

     文件        778  2012-10-27 16:25  SupermarketCash\src\org\wen\entity\User.java

     文件        412  2012-10-27 16:25  SupermarketCash\src\org\wen\entity\Vip.java

     文件        829  2012-10-27 16:27  SupermarketCash\src\org\wen\server\Server.java

     文件       3386  2012-10-27 16:45  SupermarketCash\src\org\wen\server\ServerBiz.java

............此处省略24个文件信息

评论

共有 条评论