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

这是本次实验的压缩包

晨起剪桃花

高校技术转移办公室人员如何高效开展技术需求挖掘工作?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

科技中介服务机构如何提升服务的专业性与用户粘性?.docx

科技中介服务机构如何提升服务的专业性与用户粘性?

BIZKEEN

高校技术转移办公室人员在组织科研成果展示时,如何提升推介材料的专业性与吸引力?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

三相并网逆变器无功功率扰动+孤岛检测控制算法仿真【参考文献+仿真】

内容概要:本文系统梳理了一套面向电力电子与新能源并网领域的仿真研究资源,聚焦三相并网逆变器的关键控制技术,涵盖无功功率扰动、孤岛检测算法、低电压穿越(LVRT)、中点电位平衡、虚拟同步发电机(VSG)、下垂控制、模型预测控制(MPC)、准PR控制及LCL滤波器设计等核心技术。资源包含多种逆变器拓扑结构(如T型三电平、Z源、ANPC、四桥臂等)的Simulink仿真模型,并结合扫频法进行正负序阻抗建模与稳定性分析,强调通过复现经典科研案例提升实际科研能力,适用于电力系统稳定性、微电网运行与可再生能源并网等方向的研究与验证。; 适合人群:电力电子、电气工程及其自动化、新能源科学与工程等相关专业的高校研究生、科研人员及从事光伏、储能逆变器开发的工程技术人员,需具备MATLAB/Simulink仿真基础和一定的电力系统控制理论知识。; 使用场景及目标:① 掌握三相并网逆变器在孤岛检测、无功调节、不平衡电网等复杂工况下的先进控制策略设计与仿真方法;② 借助提供的仿真模型与参考文献快速搭建科研平台,用于论文复现、课题开发或项目验证;③ 深入理解VSG、MPC、阻抗建模与下垂控制等关键技术的实现机制与工程应用路径。; 阅读建议:建议结合文中提供的网盘链接与公众号“荔枝科研社”获取完整仿真模型与参考资料,按照目录顺序循序渐进学习,注重理论推导与仿真实践相结合,优先复现基础模型再进行参数优化与创新拓展。

程序辅导帮
评论
收藏 已收藏
分享
返回顶部