1. 团队名称、团队成员介绍(需要有照片)

团队名称:一颗LFL

团队成员:廖余俊 计算机工程学院网络工程1512 学号201521123053

方旭 计算机工程学院网络工程1512 学号201521123048

蓝锦明 计算机工程学院网络工程1512 学号201521123052.

照片

迷途小书童

一只琳娜c

岛歌

2. 项目git地址

3. 项目git提交记录截图(要体现出每个人的提交记录、提交说明),老师将点击进去重点考核。

4. 项目功能架构图与主要功能流程图

5. 项目运行截图

首页

商品展示页面

成功添加至购物车

删除商品

修改商品

最后显示

6. 项目关键代码(不能太多)

public class Item

{

private int no;

private String name;

private String brand;

private double price;

// -------------------------------------------------------

// Create a new item with the given attributes.

// -------------------------------------------------------

public name(int no, String name, String brand, double price) {

this.no = no;

this.name = name;

this.brand = brand;

this.price = price;

}

public void setNo(int no) {

this.no = no;

}

public void setName(String name) {

this.name = name;

}

public void setBrand(String brand) {

this.brand = brand;

}

public void setPrice(double price) {

this.price = price;

}

/**

* 获取价格

* @return

*/

public double getPrice()

{

return price;

}

/**

* 获取产品名称

* @return

*/

public String getName()

{

return name;

}

/**

* 获取品牌名称

* @return

*/

public String getBrand() {

return brand;

}

/**

* 获取商品编号

* @return

*/

public int getNo() {

return no;

}

public String toString ()

{

NumberFormat fmt = NumberFormat.getCurrencyInstance();

return (no + "\t\t" + name + "\t\t" + brand + "\t\t" + fmt.format(price));

}

}

public class ShoppingCart

{

private int itemCount; // 商品数量

private double totalPrice; // 购物车总价格

private int capacity; // 数组大小

private Item[] cart;

// -----------------------------------------------------------

// Creates an empty shopping cart with a capacity of 5 items.

// -----------------------------------------------------------

public ShoppingCart()

{

capacity = 5;

itemCount = 0;

totalPrice = 0.0;

cart = new Item[capacity];

}

/**

*

* 添加功能

*/

public void buy(Item item)

{

if(itemCount == capacity){

increaseSize();

}

cart[itemCount] = item;

totalPrice += cart[itemCount].getPrice();

itemCount++;

return;

}

/**

* 删除功能

*/

public void deleteCart(int No) {

int i;

for (i = 0; i < cart.length; i++) {

if(cart[i].getNo() == No){

totalPrice -= cart[i].getPrice();

for (int j = i; j < cart.length-1; j++) {

cart[j] = cart[j+1];

}

itemCount--;

break;

}

}

if(i == cart.length){

System.out.println("无此商品,无法删除。");

}

return;

}

/**

* 修改功能

*/

public void updateCart(int No) {//修改编号

int i;

@SuppressWarnings("resource")

Scanner scan = new Scanner(System.in);

for (i = 0; i < cart.length; i++) {

if(cart[i].getNo() == No){

totalPrice -= cart[i].getPrice();

System.out.println("需要修改的信息如下:");

System.out.println(cart[i]);

System.out.println("请输入新的产品信息:");

cart[i].setNo(scan.nextInt());

cart[i].setName(scan.next());

cart[i].setBrand(scan.next());

cart[i].setPrice(scan.nextDouble());

totalPrice += cart[i].getPrice();

break;

}

}

if(i == cart.length){

System.out.println("无此商品");

}

return;

}

/**

* 增加购物车容量

*/

private void increaseSize()

{

Item[] temp = new Item[capacity + 3];

for (int i = 0; i < cart.length; i++) {

temp[i] = cart[i];

}

cart = temp;

}

/**

*获取商品总值

*/

public double getTotalPrice() {

return totalPrice;

}

public Item[] getCart() {

return cart;

}

public void setCart(Item[] cart) {

this.cart = cart;

}

/**

* 输出购物车信息

*/

public String toString()

{

String contents = "您的购物车信息如下:";

contents += "\nno\t\tname\t\tbrand\t\tprice\n";

for (int i = 0; i < itemCount; i++)

contents += cart[i].toString() + "\n";

return contents;

}

}

7. 尚待改进或者新的想法

浏览商品界面未对商品进行分类,商品的分类有利于用户更快查找到需要购买的商品

购买购物车中的商品时未进行支付方式的选择并支付,未实现支付功能

每个用户的购物车信息还未实现与用户一一对应

8. 团队成员任务分配,团队成员课程设计博客链接(以表格形式呈现),标明组长。

组员博客链接

java购物车系统代码_java购物车系统 团队博客相关推荐

  1. java设计博客_JAVA课程设计——团队博客

    JAVA课程设计--团队博客 1. 团队名称.团队成员介绍(需要有照片) 团队名称:"小羊吃蓝莓"小游戏 团队成员介绍: 成员 班级 学号 廖怡洁 网络1513 201521123 ...

  2. Java 课程设计:网盘系统实现(团队博客)

    网盘系统实现 1.团队介绍 2.项目介绍 2.1.功能简介 2.2.功能架构图 2.2.1.用户登录 2.2.2.文件查询 2.2.3文件上传 2.2.4 文件下载 2.2.5 文件删除 3.Gite ...

  3. java设计五子棋_JAVA课程设计+五子棋(团队博客)

    JAVA课程设计 利用所学习的JAVA知识设计一个五子棋小游戏 1.团队名称.团队成员介绍(菜鸟三人组) 杨泽斌[组长]:201521123049 网络1512 叶文柠[组员]:20152112305 ...

  4. evak购物车--团队博客

    1. 团队名称.团队成员介绍(需要有照片) 团队名称:evak 团队成员介绍:陈凯欣,计算机工程学院网络工程1512,学号为201521123034:邱晓娴,计算机工程学院网络工程1512,学号为20 ...

  5. 阿里核心系统团队博客

    http://csrd.aliapp.com/ 阿里核心系统团队博客 基础 极致 分享 Home 招聘信息 阿里核心系统团队介绍 TFS运维平台改造 1 604 天 by linqing in TFS ...

  6. 各大技术团队博客[新]

    名称 链接 美团点评技术团队 http://tech.meituan.com/ 阿里中间件团队博客 http://jm.taobao.org/ Tencent AlloyTeam http://www ...

  7. 新生基本信息管理系统java_Java课程设计 学生基本信息管理系统 团队博客

    学生基本信息管理系统团队博客 项目git地址 项目git提交记录截图 项目功能架构图与主要功能流程图 项目功能构架图: 主要功能流程图: 项目运行截图 项目关键代码 连接数据库的类代码: import ...

  8. 知名技术团队博客网站

    国内技术团队博客 1  http://tech.meituan.com/ 美团点评技术团队 2  http://fe.meituan.com/   美团前端技术团队 3  http://tech.uc ...

  9. 【转】知名技术团队博客

    因为已经确认并填写了美团点评入职系统(实习而已),好像一种归属感就油然而生了(害羞脸)...开始从各个方面去了解这个以前天天使用他家产品的公司.然后就发现了有个美团点评技术团队博客.点开一看我天果然好 ...

最新文章

  1. ext-2.2.1下载地址
  2. 全部python编程语言-可以用 Python 编程语言做哪些神奇好玩的事情?
  3. Java求n以内素数_求0到n之间素数个数的序列(Java)
  4. html全屏播放一段视频,显示HTML5视频全屏(Show HTML5 Video Fullscreen)
  5. Mysql索引介绍及常见索引的区别
  6. 【分布式计算】关于Hadoop、Spark、Storm的讨论
  7. 持续集成、持续交付、持续部署(转载)
  8. 阶段3 1.Mybatis_08.动态SQL_02.mybatis中动态sql语句-where标签的使用
  9. 数据结构与算法之排序篇(下)
  10. 科大讯飞,百度,思必驰,云知声四款识别引擎降噪算法性能对比
  11. 使用yum命令创建缓存时报错:Peer cert cannot be verified or peer cert invalid
  12. excel表格公式出现#REF是什么意思
  13. 对话冉小波:NULS三年来的实战心得与反思 |链捕手
  14. “电动车之王”还不够,雅迪高端品牌怎么打?
  15. 2017年一定要关注ARM这三大技术
  16. 群晖使用Linux命令,群晖216++常用命令及dokcer使用笔记「持续更新」
  17. 什么是机器学习,为什么它如此重要?
  18. The Unarchiver-解决Mac解压后文件名乱码问题_我是亲民_新浪博客
  19. 项目经理如何做项目工作汇报?
  20. 一文读懂物联网大数据产业链

热门文章

  1. 数据库事务开启,提交与回滚
  2. Android UI【android 仿微信、QQ聊天,带表情,可翻页,带翻页拖动缓冲】
  3. 数学之路-SPSS备忘(1)
  4. 我和Python的Py交易》》》》》》数据类型
  5. u盘装系统学计算机好,大家说最好的u盘装系统工具是哪一个
  6. 24种常用颜色的中英文名字
  7. 什么是外键,外键的作用
  8. Microsoft.Practices.Unity实现代码依赖注入、XML依赖注入和AOP切面编程
  9. 冷热酸甜、想成就成?冷酸灵母公司登康口腔欲在深交所主板上市
  10. usb:认识usb传输(一)