建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
温馨提示

抱歉,您需设置社区昵称后才能参与社区互动!

前往修改
我再想想

2020软件开发创新大赛

话题 : 8 成员 : 197

加入HCSD

【实操测验提交】2020软件开发创新大赛DevCloud实操测验提交入口

GFuniv 2020/11/14 9079
欢迎大家参加2020软件开发创新大赛


以下为DevCloud实操测验结果提交要求:

【实操测验提交】

以个人为小组, 进行基本的业务需求分析和数据库设计,基于华为DevCloud ,利用 JavaWeb 技术, 完成一个电商平台新的模块,例如:新增一个饮料模块。

实验成果物要求:

要求各小组以个人为单位, 完成并提交以下成果物:

成果物一: 用例图——业务需求分析

要求:学生对已确定的题目,完成业务需求分析,完成用例图。

提交成果物:用例图截图,示例如下(提交的截图必须包含本人的华为云账号):

图1.png

成果物二: ER图——数据库设计

要求:基于业务需求分析,设计目标系统,输出ER图。提交成果物:ER图截图(提交的截图必须包含本人的华为云账号),示例如下:

图2.png

成果物三: 项目代码包

要求:学生基于华为 DevCloud ,利用 Java Web 技术,利用 云数据库RDS,完成一个电商平台新模块的开发。

提交成果物:程序页面截图,需包含前后台页面,共7张截图(提交的截图必须包含本人的华为云账号)。示例如下:

图3.png

后台界面截图示例-01

图4.png

后台界面截图示例-02

图5.png

前台界面截图示例-03

图6.png

前台界面截图示例-04 

图7.png

前台界面截图示例-05

考核方法:

教师根据学生实验过程、实验完成情况及提交的成果物进行评分。

评分标准:

(1)按实验要求对小组项目获取并确定需求分析,完成用例图 25分。

(2)按实验要求对小组项目进行合理的设计,完成ER图25分。

(3)按实验要求正确开发出模块,完成三张前端截图,二张后端截图,每张图各10分,共计50分。

 提交方式:

参赛选手需在此帖进行作业提交(共包括7张图片),要求如下:

1)你的华为云账号

2)作业截图(具体要求见实验成果物要求


回复 (115)

2020/12/25 12:23

#include <iostream>

#include <fstream>

#include<vector>

#include <queue>

#include <stack>

#include <cstring>

#include <cmath>

#include <ctime>

using namespace std;


int maskMap[12][12] = {

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

};



int minstep = 500;

struct Node

{

int x, y, mount;

char name;


Node(int x, int y, int m, char name) { this->x = x, this->y = y, mount = m; this->name = name; }

Node() { x = y = mount = name = 0; };

bool inBox(Node& l, Node& r);

int getDistance(Node& r)const;

bool operator == (Node& r) {

return (x == r.x) && (y == r.y);

}

};

int Node::getDistance(Node& r) const

{

return abs(x - r.x) + abs(y - r.y);

}

bool Node::inBox(Node& l, Node& r)

{

return (((l.x <= x) && (x <= r.x)) or (((l.x >= x) && (x >= r.x))))

&& (((l.y <= y) && (y <= r.y)) or ((l.y >= y) && (y >= r.y)));

}





struct status

{

char path[40];

char walkPath[500];

int crt_step;

int map[12][12];


status() { path[0] = 'S'; step = 0; crt_step = 0; depth = 1; next = 0; walkPath[0] = 0; }


Node courier;

vector<Node> v_demand, v_denote;

int step;

int depth;

int next;//深度优先回溯下标


void get(int index);

int getOnePath();//获得可行解

void give(int index);

status getNext();

bool haveNext();

void addNode(Node node);

void output();

void outputPath();

void outputBest();

int getMaxRatio();

void iniMap();

void walk();

void walk(char dir);


char* getWay(char A, char B, char* way)const;

char* getWay(Node A, Node B, char* way)const;

void getWalkPath();

void go(char name);

Node GetNodeFromName(char name) const;

bool finish();

void cleanBoard();

};

void status::iniMap()

{

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

{

for (int j = 0; j < 12; j++)

map[i][j] = maskMap[i][j] = 0;

}

for (int i = 0; i < v_demand.size(); i++)

{

Node& node = v_demand[i];

maskMap[node.x][node.y] = node.mount;

}

for (int i = 0; i < v_denote.size(); i++)

{

Node& node = v_denote[i];

maskMap[node.x][node.y] = node.mount;

}

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

{

for (int j = 0; j < 12; j++)

map[i][j] = maskMap[i][j];

}

}

bool status::finish()

{

cleanBoard();

return walkPath[crt_step] == 0;

}

void status::walk(char dir)

{

switch (dir)

{

case 'W': courier.y--; break;

case 'N': courier.x--; break;

case 'S': courier.x++; break;

case 'E': courier.y++; break;

}

if (courier.x < 0 || courier.x > 11 || courier.y < 0 || courier.y > 11)

{

cout << "out of space!" << endl;

int s;

cin >> s;

}


if (map[courier.x][courier.y] + courier.mount > 0)

{

courier.mount += map[courier.x][courier.y];

if (courier.mount > 100) courier.mount = 100;

map[courier.x][courier.y] = 0;

}

else

{

map[courier.x][courier.y] += courier.mount;

courier.mount = 0;

}

map[v_denote[0].x][v_denote[0].y] = 5000;

}

Node status::GetNodeFromName(char name) const

{

switch (name)

{

case 'A':

case 'B':

case 'C':

case 'D':

case 'E':

for (int i = 0; i < v_demand.size(); i++)

{

if (v_demand[i].name == name) return v_demand[i];

}

break;

default:

for (int i = 0; i < v_denote.size(); i++)

{

if (v_denote[i].name == name) return v_denote[i];

}

break;

}

return v_denote[0];

}

char* status::getWay(Node from, Node to, char* way) const

{

int x, y;

int i, j;

x = to.x - from.x;

y = to.y - from.y;

for (i = 0; i < abs(x); i++)

if (x < 0)way[i] = 'N';

else way[i] = 'S';

for (j = 0; j < abs(y); j++)

if (y < 0) way[i + j] = 'W';

else way[i + j] = 'E';

way[i + j] = 0;

return way;

}

char* status::getWay(char A, char B, char* way)const

{

Node from, to, tmp;

tmp = from = GetNodeFromName(A);

to = GetNodeFromName(B);


return getWay(from, to, way);


}

void status::walk()

{

if (walkPath[crt_step] == 0) return;

cout << walkPath[crt_step] << endl;

walk(walkPath[crt_step]);

crt_step++;

}

void status::getWalkPath()

{

int i;

walkPath[0] = 0;

char way[40];

//cout << path << endl;

int len = strlen(path);

for (i = 0; i < len - 1; i++)

{

//

strcat(walkPath, getWay(path[i], path[i + 1], way));

//strcat(walkPath, getWay(path[i], path[i + 1], way));

//out<<path[i]<<"---"<<path[i+1]<<"\t" << way << endl;

}

}


vector<status> v_best;

float weight = 0;

int rltcnt = 0;

int status::getMaxRatio()

{

float maxRatio = 0, ratio;

int maxindex = 0, i;

for (i = 0; i < v_demand.size(); i++)

{

Node node = v_demand[i];

int give = -node.mount;

if (give > 100)give = 100;

if (give > courier.mount) give = courier.mount;


ratio = give / (float)courier.getDistance(v_demand[i]);

if (ratio > maxRatio)

{

maxRatio = ratio;

maxindex = i;

}


give = 100;

if (give > -node.mount) give = -node.mount;


ratio = give / (float)(v_denote[0].getDistance(v_demand[i]) + courier.getDistance(v_denote[0]));//回原点再去送

if (ratio > maxRatio)

{

maxRatio = ratio;

maxindex = -1;

}


if (node.inBox(courier, v_denote[0]))//在回原点路上

return i;

}


return maxindex;

}

int status::getOnePath()

{

int sum = 0;

int i;

for (i = 0; i < v_demand.size(); i++)

{

sum += v_demand[i].mount;

}


while (v_demand.size() > 0)

{

int next = getMaxRatio();

if (next == -1)

get(0);

else

{

give(next);

if (v_demand.size() == 0)

return step;

}

if (courier.mount == 0)

get(0);

}

return step;

}


void status::outputPath()

{

path[depth] = 0;

int i = 0;//out << path<<"\t";


int cnt[10] = { 0,0,0,0,0,0,0,0,0 };

for (i = 0; i < depth; i++)

{

if (path[i] != 'S')

{

//out << path[i];

cnt[path[i] - 'A'] ++;

}

}

//out << "\t*\t";

for (i = 0; i < 5; i++)

{

//out <<char( 'A' + i) << cnt[i];

}


//out << endl;

}


void status::addNode(Node node)

{

if (node.mount > 0)

v_denote.push_back(node);

else v_demand.push_back(node);

}

void status::outputBest()

{

//out<<depth << "\t" << step << "\t" ;

outputPath();

}


void status::output()

{

int i, j;


//out << int(courier.x) << "\t" << int(courier.y) << "\t" << courier.mount << endl;


for (i = 0; i < 12; i++)

{

for (j = 0; j < 12; j++) //

{

if (i == courier.x && j == courier.y && map[i][j] == 0)

{

}//out << courier.mount << "*";{}

else

{

}//out << map[i][j] << "\t";// = maskMap[i][j];


}

//out << endl;

}


//out << endl;

}

bool status::haveNext()

{

if (v_demand.size() == 0) return false;

if (step >= minstep) return false;

if (step + v_demand[0].getDistance(courier) > minstep) return false;


if (courier.mount == 100)

{

if (next < v_demand.size()) return true;

}

else if (courier.mount == 0)

{

if (next < v_denote.size())return true;

}

else

{

if (next < v_demand.size() + v_denote.size())return true;

}

return false;

}

int sltmod = 0;

status status::getNext()

{

status s;

s = *this;

if (courier.mount == 100)//满载

{

s.give(next);

next++;

return s;

}

else if (courier.mount == 0)//空载

{

s.get(next);

next++;

return s;

}

else

{

if (next < v_demand.size())//去配送小区

{

if (v_denote[0].inBox(courier, v_demand[next]))//去该小区经过仓库

{

s.v_demand.clear();

}

else

{

if (s.courier.mount + v_demand[next].mount < -100)//某个节点要去三次,剪枝。效率提高明显,通过实验,会错过部分最优解,但是能得到最优解,感觉在数学上两种情况是等价的,没证明

{

s.v_demand.clear();

next++;

return s;

}


s.give(next);

}

next++;

return s;

}

else//去取口罩

{

int denote;

denote = next - v_demand.size();

s.get(denote);

next++;

return s;

}

}

}

void status::go(char name)

{

int i;

for (i = 0; i < v_demand.size(); i++)

{

if (name == v_demand[i].name)

{

give(i);

}

}

for (i = 0; i < v_denote.size(); i++)

{

if (name == v_denote[i].name)

{

get(i);

}

}

}

void status::get(int index)

{

Node& node = v_denote[index];

path[depth] = node.name;

depth++;

path[depth] = 0;

next = 0;


step += abs(courier.x - node.x) + abs(courier.y - node.y);

courier.x = node.x;

courier.y = node.y;


if (node.mount + courier.mount > 100)

{

node.mount -= (100 - courier.mount);

courier.mount = 100;

}

else

{

courier.mount += node.mount;

v_denote.erase(v_denote.begin() + index);

}

}


void status::give(int index)

{

Node& node = v_demand[index];

step += abs(courier.x - node.x) + abs(courier.y - node.y);


path[depth] = node.name;

depth++;

path[depth] = 0;

next = 0;

courier.x = node.x;

courier.y = node.y;


if (courier.mount + node.mount >= 0)

{

courier.mount += node.mount;

v_demand.erase(v_demand.begin() + index);

}

else

{

node.mount += courier.mount;

courier.mount = 0;

}


if (v_demand.size() == 0)

{

rltcnt++;

if (step <= minstep)

{

if (step < minstep) v_best.clear();

minstep = step;

v_best.push_back(*this);

}

}

}



void getBest(status s);

void status::cleanBoard()

{

if (walkPath[crt_step] != 0)

return;

int i, j, cnt = 0, mount = 0;

status s;

for (i = 0; i < 12; i++)

{

for (j = 0; j < 12; j++)

{

if (map[i][j] < 0)

{

s.addNode(Node(i, j, map[i][j], 'A' + cnt));

cnt++;

mount += map[i][j];

}

}

}

if (cnt == 0) return;

char way[30];

walkPath[0] = 0;

crt_step = 0;

Node c = courier;

if (mount + courier.mount > 0)

{

for (i = 0; i < s.v_demand.size(); i++)

{

strcat(walkPath, getWay(c, s.v_demand[i], way));

c = s.v_demand[i];

}

}

else

{

for (i = 0; i < s.v_demand.size(); i++)

{

strcat(walkPath, getWay(c, v_denote[0], way));

strcat(walkPath, getWay(v_denote[0], s.v_demand[i], way));

c = s.v_demand[i];

}

}

//out << "in*******" << endl;


// output();

//cout<<"in     *****  " << walkPath << endl;

}

int main()

{

minstep = 500;

rltcnt = 0;


char code;

status s, start;

int x, y, mount;

int i = 0;

// cout << "----" << endl;

while (cin >> code)

{

switch (code)

{

case 'S':

cin >> x >> y;

// out << "S\t" << x << "\t" << y << endl;

s.courier = Node(x, y, 100, 'C');

s.addNode(Node(x, y, 5000, 'S'));

break;

case 'R':

cin >> x >> y >> mount;

// out << "R\t" << x << "\t" << y << "\t" << mount << endl;

s.addNode(Node(x, y, mount, 'A' + i));

i++;

if (s.v_demand.size() == 5)

{

start = s;

start.getOnePath();

strcpy(s.path, start.path);

s.getWalkPath();

s.iniMap();

// s.output();

// out << s.path << endl;

// out << s.walkPath << endl;

}

break;

case 'G':

s.walk();

// s.output();

if (s.finish())

{

goto lab;

}

break;

}

}

lab:



return 0;

}


void getBest(status s)

{

stack<status> stk;

status start = s;

s.output();

minstep = s.getOnePath();

s.outputBest();


rltcnt = 0;

v_best.clear();


stk.push(start);

do {

status& top = stk.top();

status next;


if (top.haveNext())

next = top.getNext();

else stk.pop();


if (next.haveNext())

stk.push(next);

} while (!stk.empty());

//out << "best size\t" << v_best.size() << endl;

for (int i = 0; i < v_best.size(); i++)v_best[i].outputBest();


}



2020/12/1 09:31

作业完成

    杨宇--作业.rar 13.14 MB,下载次数:1

user0150
0 0
2020/12/1 00:52

华为云账号:user0150

6.png

7.png

1.png

2.png

3.png

4.png

5.png


Snice1993
0 0
2020/11/30 23:22

1)user0060

2)

业务分析截图.jpg

数据库ER图截图.jpg

前台截图1.JPG

前台截图2.jpg

前台截图3.jpg

后台截图1.JPG

后台截图2.JPG


尼尼
0 0
2020/11/30 23:18

1.png

2.png

3.png

4.png

5.png

6.png

7.png

8.png

9.png


苏越鑫
0 0
2020/11/30 23:08

用例图.jpg

ER图.jpg

后台2增加用户.jpg

后台3.jpg

前台1.jpg前台2.jpg

前台3.jpg



user0273
0 0
2020/11/30 23:07

1用例图

002.JPG

2.E-R图

00.JPG

3.后台1

1.JPG

4.后台2


6.JPG

5.后台3


2.JPG


3.JPG

6.    前台页面1

7.JPG


7.前台页面2

8.JPG



user0074
0 0
2020/11/30 22:46

用例图.png

er图.png

00.png

11.png

33.png

44.png

22.png


2020/11/30 22:36

1.用例图

00.jpg

2.ER图

001.jpg

3.后台——增加品类

01.jpg

4.后台——增加商品

02.jpg

5.后台-商品管理

03.jpg

6.前台——查看商品详情

10.jpg

7.前台——分类查看商品

06.jpg

6.前台——查看订单


08.jpg



上划加载中
标签
您还可以添加5个标签
  • 没有搜索到和“关键字”相关的标签
  • 云产品
  • 解决方案
  • 技术领域
  • 通用技术
  • 平台功能
取消

GFuniv

角色:成员

话题:6

发消息
更新于2020年11月14日 15:21:43 9079115
直达本楼层的链接
楼主
正序浏览 只看该作者
【实操测验提交】2020软件开发创新大赛DevCloud实操测验提交入口

提示: 该帖被管理员或版主屏蔽
点赞 举报
分享

分享文章到朋友圈

分享文章到微博

BuddhaLike

角色:成员

话题:1

发消息
发表于2020年12月25日 12:23:00
直达本楼层的链接
118#
只看该作者
此帖仅作者可见
评论 举报

冰山蓝魔

角色:成员

话题:0

发消息
发表于2020年12月01日 09:31:48
直达本楼层的链接
117#
只看该作者
此帖仅作者可见
评论 举报

user0150

角色:成员

话题:0

发消息
发表于2020年12月01日 00:52:56
直达本楼层的链接
116#
只看该作者
此帖仅作者可见
评论 举报

Snice1993

角色:成员

话题:0

发消息
发表于2020年11月30日 23:22:38
直达本楼层的链接
115#
只看该作者
此帖仅作者可见
评论 举报

尼尼

角色:成员

话题:0

发消息
发表于2020年11月30日 23:18:18
直达本楼层的链接
114#
只看该作者
此帖仅作者可见
评论 举报

苏越鑫

角色:成员

话题:0

发消息
发表于2020年11月30日 23:08:58
直达本楼层的链接
113#
只看该作者
此帖仅作者可见
评论 举报

user0273

角色:成员

话题:0

发消息
发表于2020年11月30日 23:07:42
直达本楼层的链接
112#
只看该作者
此帖仅作者可见
评论 举报

user0074

角色:成员

话题:0

发消息
发表于2020年11月30日 22:46:38
直达本楼层的链接
111#
只看该作者
此帖仅作者可见
评论 举报

pumpkindad

角色:成员

话题:0

发消息
发表于2020年11月30日 22:36:58
直达本楼层的链接
110#
只看该作者
此帖仅作者可见
评论 举报

游客

您需要登录后才可以回帖 登录 | 立即注册