EE308_Lab9

厦大打工人 厦大打工人 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Link of this classhttps://bbs.csdn.net/forums/MUEE308FZ?typeId=17613
Requirement of this assignmenthttps://bbs.csdn.net/topics/603386400
NameYUAN XIA
MU ID_FZU ID19105185_831901317

 

目录

Question


Question

Live-streaming sale, through some Internet platforms, is a new way of service using live-streaming technology for close commodity display, consultation response, and shopping guide. Merchants can open their own live broadcast room, or employ professional anchors to recommend goods. At present, not only many celebrities flock into this field, but some big companies’ executives are also frequently involved. Please try to design a comprehensive live-streaming sale system.

 

(i) List some actors that interact with this system. Explain the relevance of each actor.

Your Answer:

 

Actor:

       1.customer. People who join the live broadcast platform to buy goods or return goods.

       2.merchant. People who launch live broadcast platform to sell and manage goods.

 

 

 

 

(ii) Prepare a use case diagram for this system.

Your Answer:

 

 

 

 

(iii) Prepare a normal scenario for each use case. (i.e. describe each use case in words)

Your Answer:

 

 

    1.After joining the live studio, customers can see the product details and then choose whether to buy the product.

 

 

     2.The merchant launched a live broadcast to sell the goods.

 

 

    3. Merchants manage commodities, including the addition, deletion, modification and inspection of commodities

 

(iv) Prepare sequence diagrams or activity diagrams for primary scenarios. By the way, each scenario can be described by a sequence diagram or an activity diagram, but both diagrams must be used in the question.

Your Answer:

  1. sequence diagram:

 

activity diagram:

 

 

2. sequence diagram:

 

activity diagram:

 

3. sequence diagram:

 

 

 

activity diagram:

 

 

(v) Prepare a class diagram for this system. Explain which principles of object-oriented are applied in your design.

Your Answer:

 

 

Composite/Aggregate Reuse Principle CARP

 

 

 

(vi) Prepare state diagrams for primary classes.

Your Answer:

 

 

 

 

 

 

 

 

 

 

(vii) Write the skeleton code corresponding to the class diagram in C++, Java, Python, or C#.

 

#include <iostream>

using namespace std;

class customer{
private:
    string name;
    string userID;
};

class merchant{
    string name;
};

class BroadcastRoom:public merchant{
private:
    string roomID;
    string userID;
    string roomName;
    bool enter;
public:
    void initiateRoom(string roomID, string roomName, string userID);
    void joinRoom(string roomID, string userID,string roomName, bool enter);
};

class commodity: public merchant{
private:
    string commodityName;
    string link;
    double price;
    int number;
    string orderNum;
    string userName;
public:
    void addCommodity(string commodityName, string link, string orderNum, int number);
    void minusCommodity(string commodityName, string link, string orderNum, int number);
    void inspection(string commodityName, string link, string orderNum, double price);
    void changePrice(string commodityName, string link, string orderNum, int number, double price);
};


class order : public customer{
private:
    string orderNum;
    string address;
    string userName;
    double price;
public:
    void returnBack(string orderNum, string address, string userName, double price);
};

class shoppingCart : public customer{
private:
    string link;
    double price;
    string address;
    string userName;
public:
    void purchase();
    void addCommodity();
    void minusCommodity();
};

 

...全文

相关推荐

EE-308 LAB4 final version.7z

这是本次实验的压缩包

晨起剪桃花

春秋BC742年世界历史地图矢量文件SHP格式.zip

本资源为《春秋BC742年世界历史地图矢量文件SHP格式》压缩包,文件大小约 26.55 MB,便于集中下载、整理和使用。具体内容请结合压缩包内的实际文件与说明查看。 在当前可读取的目录中,可见属性表(.dbf)、投影说明文件(.prj)、Shapefile 主文件(.shp)、Shapefile 索引(.shx)。建议解压后保持原有目录结构,先浏览文件清单与说明,再选择需要的资料进行加载或整理。 应用方面,可根据实际资料用于学习练习、资料检索、研究整理或项目参考。使用时可先确定所需内容,建立清晰的文件分类,再按项目要求进行筛选、转换与汇总。 使用 Shapefile 数据时,请把实际配套的 .shp、.shx、.dbf 等文件保存在同一目录,并保持同名关联;加载后再检查坐标系与中文字段显示。如需叠加其它数据,请先统一坐标与字段口径。 数据来源、时间范围、坐标系、字段定义、精度和使用条件,请以实际文件及原始说明为准。本介绍不对文件名之外尚未核实的信息作额外承诺。

白水先森

春秋BC674年世界历史地图矢量文件SHP格式.zip

本资源为《春秋BC674年世界历史地图矢量文件SHP格式》压缩包,文件大小约 26.49 MB,便于集中下载、整理和使用。具体内容请结合压缩包内的实际文件与说明查看。 在当前可读取的目录中,可见属性表(.dbf)、投影说明文件(.prj)、Shapefile 主文件(.shp)、Shapefile 索引(.shx)。建议解压后保持原有目录结构,先浏览文件清单与说明,再选择需要的资料进行加载或整理。 应用方面,可根据实际资料用于学习练习、资料检索、研究整理或项目参考。使用时可先确定所需内容,建立清晰的文件分类,再按项目要求进行筛选、转换与汇总。 使用 Shapefile 数据时,请把实际配套的 .shp、.shx、.dbf 等文件保存在同一目录,并保持同名关联;加载后再检查坐标系与中文字段显示。如需叠加其它数据,请先统一坐标与字段口径。 数据来源、时间范围、坐标系、字段定义、精度和使用条件,请以实际文件及原始说明为准。本介绍不对文件名之外尚未核实的信息作额外承诺。

白水先森

欠驱动水面船舶的自适应神经(NN)控制圆形+直线轨迹跟踪控制研究(Matlab代码实现)

内容概要:本文针对欠驱动水面船舶在圆形和直线轨迹下的高精度跟踪控制问题,提出了一种基于自适应神经网络(Adaptive Neural Network, NN)的非线性控制方法。该方法有效应对船舶在欠驱动条件下存在的强耦合、非线性动力学特性以及外界环境干扰(如风浪流)等挑战。通过构建适当的神经网络逼近系统未知非线性项,并结合Lyapunov稳定性理论设计自适应律,确保闭环系统的全局一致最终有界性(UUB)。文中详细阐述了控制器结构设计、神经网络权重在线更新机制、控制律推导过程,并利用Matlab/Simulink平台对直线与圆形期望轨迹进行了仿真验证,结果表明所提方法具有良好的跟踪精度、动态响应性能与抗干扰能力,适用于复杂海洋环境下无人船的自主航行控制任务。; 适合人群:具备自动控制理论、船舶与海洋工程或机器人控制等相关专业背景,熟悉非线性系统分析、自适应控制原理,并掌握Matlab仿真工具的研究生、科研人员及从事无人船控制系统开发的工程技术人员。; 使用场景及目标:①研究欠驱动船舶在复杂轨迹下的自主跟踪控制策略;②掌握自适应神经网络在不确定非线性系统中的建模与补偿方法;③复现并拓展高水平期刊论文中的智能控制算法;④为无人水面艇(USV)的实际控制系统开发提供理论支持与仿真验证基础。; 阅读建议:建议读者结合文中的数学推导与Matlab代码实现同步学习,重点理解Lyapunov函数的构造思路、神经网络逼近机制及其参数自适应调整规律,有条件者可进一步将算法迁移至硬件在环(HIL)平台或实船系统进行测试,并与其他先进控制方法(如滑模控制、模型预测控制)开展性能对比分析。

欢多天天写代码

战国BC301年世界历史地图矢量文件SHP格式.zip

本资源为《战国BC301年世界历史地图矢量文件SHP格式》压缩包,文件大小约 2.28 MB,便于集中下载、整理和使用。具体内容请结合压缩包内的实际文件与说明查看。 在当前可读取的目录中,可见属性表(.dbf)、投影说明文件(.prj)、Shapefile 主文件(.shp)、Shapefile 索引(.shx)。建议解压后保持原有目录结构,先浏览文件清单与说明,再选择需要的资料进行加载或整理。 应用方面,可根据实际资料用于学习练习、资料检索、研究整理或项目参考。使用时可先确定所需内容,建立清晰的文件分类,再按项目要求进行筛选、转换与汇总。 使用 Shapefile 数据时,请把实际配套的 .shp、.shx、.dbf 等文件保存在同一目录,并保持同名关联;加载后再检查坐标系与中文字段显示。如需叠加其它数据,请先统一坐标与字段口径。 数据来源、时间范围、坐标系、字段定义、精度和使用条件,请以实际文件及原始说明为准。本介绍不对文件名之外尚未核实的信息作额外承诺。

白水先森
评论
收藏 已收藏
分享
返回顶部