本文将带您了解关于用UML做好系统分析的新内容,同时我们还将为您解释用uml做好系统分析的方法的相关知识,另外,我们还将为您提供关于48430系统分析、efi系统分区是什么?efi系统分区如何分配盘符
本文将带您了解关于用UML做好系统分析的新内容,同时我们还将为您解释用uml做好系统分析的方法的相关知识,另外,我们还将为您提供关于48430 系统分析、efi系统分区是什么?efi系统分区如何分配盘符?efi系统分区怎么删除?、Pig系统分析(2)、UML实例(三):在线购物系统分析鲁棒图的实用信息。
本文目录一览:- 用UML做好系统分析(用uml做好系统分析的方法)
- 48430 系统分析
- efi系统分区是什么?efi系统分区如何分配盘符?efi系统分区怎么删除?
- Pig系统分析(2)
- UML实例(三):在线购物系统分析鲁棒图
用UML做好系统分析(用uml做好系统分析的方法)
使用UML如何能让我们做好系统分析的工作呢?就让我们通过本章的基金模拟项目,先睹 为快,抢先体验一番。
CIM-1:定义业务流程
定义及分析业务流程(Business Process)是为了尽快理清系统范围,以便估算开发成本及时间,可不是为了要改造业务流程。系统分析员千万别误解了此步骤的目的。所以,系统分析员在定义及分析业务流程时,要记得挑选跟系统有关的业务流程。
CIM-1定义业务流程的生成,主要有如下的业务用例图和简述。请看图2-1的业务用例图,图中的每一个业务用例代表一条业务流程,业务执行者则代表位于企业外但会启动或参与业务流程的人。投资人到银行临柜申购基金,启动了银行内部的一段关于申购基金的业务流程。再者,投资人也可能临柜办理赎回基金,这又引发了另一条业务流程。
至于业务用例简述,简洁扼要即可,我们主要用它来记录和区分业务流程。
CIM-2:分析业务流程
通过CIM-1圈出了系统将参与的业务流程之后,针对每一个业务用例,系统分析员得开始分析它的工作流程,并且绘制活动图(Activity Diagram)与业务人员取得共识。随后到了CIM-3时,才能够依此定义出系统可以协助之处,并且规划出系统范围。
此处,我们挑选一般的申购基金流程当示范,并绘制出如图2-2所示的活动图,展示了单笔申购基金的一般交易流程。
CIM-3:定义系统范围
经过了CIM-1的定义业务流程,以及CIM-2的分析业务流程之后,终于进入到CIM-3这场压轴戏了。CIM-1和CIM-2的生成文件,跟CIM-3的生成文件之间,有如下的关联性:
CIM-2活动图中的每一个动作,都可能成为CIM-3的系统用例。
CIM-1中的业务执行者,以及CIM-2中的动作负责人,都可能成为CIM-3的系统执行者(System Actor)。
针对上述的图2-2一般流程的活动图,我们分析得出如图2-3的系统用例图,以及下述的用例简述。
PIM-1:分析系统流程
在CIM阶段,系统分析员大约花1~2周的时间,尽快生成初步的系统用例,以便让相关的决策人员可以从中挑选出首期开发的系统用例,而这也就是首期的系统范围。
随后,项目正式进入PIM阶段,也是正式进入分析阶段,所以系统分析员将投入更多的时间,针对首期的系统用例详述规格,作为正式需求文件的一部分,也作为业务人员与开发人员之间的沟通文件。
所以,系统分析员在PIM-1的主要工作,将针对每一个系统用例,分析其内部细节,并编写详尽的系统用例叙述(UC Description)。UML并未提出标准的叙述格式可供遵守,不过系统分析员可以在网络上找到许多实用的用例叙述格式,或者翻阅一些UML或用例相关书籍,也可以发现许多很有特色的用例叙述格式。
此处,我们示范编写“网络申购单笔基金”和“网络申购定期定额基金”的系统用例叙述,如下图2-4和图2-5所示:
PIM-2:分析业务规则
企业通过一组规则(Buisness Rules)来控制整体的运作,包括人员、流程、系统、概念的运作,皆受制于业务规则。由此足见业务规则之重要,所以早从PIM-1的系统用例叙述,一直到此处的PIM-2状态图以及稍后的PIM-3类图,我们都会要求系统分析员必需通过这些UML图,记录且呈现重要的业务规则。
例如,在经过PIM-1的步骤之后,我们认为“定期定额申购”是很重要的业务对象,而且涉及许多重要的业务规则,所以决定为它绘制如图2-6的状态图,以便组织业务规则,同时也对定期定额申购有更深入的理解。
PIM-3:定义静态结构
在PIM-3中,系统分析员用类图来表达系统内部的静态结构。系统只有具备稳定且具弹性的静态结构,才能够顺应需求变更,迅速支撑多样化的系统用例。之后,类图可能通过设计师之手,进行调整,并且成为程序员最关切的设计图之一。程序员通常会按照类图的内容,来编写并组织源代码。
在PIM-3的过程中,系统分析员寻找操作绝对优先于寻找属性。因为属性随处可见,特别是从PIM-1搜集而来的窗体,里头多的是对象必须保存的属性。而寻找操作就没这么直接简单了,系统分析员必须多动脑筋才能定义出操作,所以先别管属性了,记得优先找操作。
进行PIM-3时,系统分析员可以通过下列步骤,建立出如图2-7的类图:
套用交易模式,并且经过调整之后,系统分析员可以获得初步的静态结构。
分析PIM-2的状态图之后,系统分析员可以为类增加属性及操作。
分析PIM-1搜集来的窗体,系统分析员可以为类增加更多的属性。
经过PIM-4的序列图,系统分析员可以为类增加更多的操作,并且描述操作的方法。
PIM-4:定义操作及方法
在PIM-4中,系统分析员可以用序列图来表达,系统内部一群对象合力完成某一个系统用例时,执行期间的交互情形。之后,序列图可能通过设计师之手,进行调整,并且成为程序员最关切的设计图之二(另一张是类图)。程序员通常会按照序列图的内容,编写出方法的源代码雏型。
此外,PIM-1的系统用例叙述和PIM-3的类图,对PIM-4的序列图有不可或缺的贡献。从PIM-1的系统用例叙述中,系统分析员可以分析出系统流程。而在PIM-3的类图中,系统分析员定义出系统内部的静态结构。随后,到了PIM-4的序列图时,则结合了系统用例以及静态结构两者。
系统分析员通过序列图的思考与表达,试图安排依据类们所生成的一群对象之间的交互,让这一群对象可以合力完成某一个系统用例。同时,在序列图中,一群对象交互所引发的操作,则可以反馈给类图,定义出更多的操作及属性,甚至发现之前未发现的其他类及关系。
系统分析员可参考下述步骤来绘制序列图:
1.扮演启动者的执行者对象放置于序列图最左方;扮演支持者的执行者对象放至于序列图的最右方。
2.针对系统用例叙述里所记载每项流程步骤,判断执行时需要使用到哪些数据,且可指派拥有该数据的对象负责该项工作。
3.试着执行序列图,以便调整流程,并且为操作加上参数。
4.把绘制序列图时所找到的操作及属性,反馈给类图。
以“网络申购单笔基金”系统用例之主要流程为例,我们示范绘制出如图2-8所示的序列图。
最后,系统分析员可以试着执行一次序列图的流程,并且为操作加上参数。增加输入(in)及输出(out)参数如下:
1.查询托售基金清单(out 基金名称清单)
2.查询基金名称(out 基金名称,基金代号)
3.查询扣款账号(out 扣款账号)
4.单笔申购基金(in 基金代号,申购金额)
5.计算手续费(in 申购金额,out 手续费)
6.查询银行折扣(out 银行折扣)
7.查询基金管理费(out 基金管理费)
8.查询综存账户余额(out 综存账户余额)
9.查询综存账户余额(in 扣款账号,out 综存账户余额)
10.确认单笔申购(out 凭证号码)
11.扣款()
12.扣款(in 交易金额)
13.设定申购日期()
14.产生交易编号(out 凭证号码)
由于,单笔申购和定期定额申购计算手续费的方法相同,所以系统分析员可以将单笔申购类里的“计算手续费”操作移至申购交易类,并汇总上述序列图所新增的操作与相关属性,更新类图如2-9所示。
在CIM与PIM之后
由于我们采用MDA(Model-Driven Architecture)开发程序,作为专业分工的依据,因此系统分析员的工作聚焦于CIM与PIM阶段,至于PSM及编码阶段,则交由其他的设计师负责之。MDA主要将生成的UML模型,分为下列三个阶段:
CIM(Computation Independent Model)──聚焦于系统环境及需求,但不涉及系统内部的结构与运作细节。
PIM(Platform Independent Model)──聚焦于系统内部细节,但不涉及实现系统的具体平台(Platform)。
PSM(Platform Specific Model)──聚焦于系统落实于特定具体平台的细节。例如,Spring、EJB2或.NET都是一种具体平台。
因此,系统分析员执行了前述的CIM与PIM步骤,并且获得高质量的生成之后,设计师会依据具体平台进一步生成PSM阶段的设计,并交由程序员按图编码,编写出适用于特定具体平台的代码。
48430 系统分析
48430 Assessment Task 2: Assignment
Please read and follow ALL submission requirements carefully.
Updates
If applicable, any updates to the assignment will appear here.
Resources
Sample executable employeelist_solution.out download
Source code template: employeelist.c download
Functionality of your program must be identical to the sample executable on Ed. When in
doubt run the sample to understand the requirements. See the Marking Criteria tab for more
information
Task Description
Data Engineers regularly collect, process and store data. In this task you will develop a
deeper understanding of how C programming language can be used for collecting, processing
and storing data. In this assignment you get the opportunity to build an interactive program
that can manage a list of employees in a company.
The list is stored as an array of employee_t type structures
employee_t employeelist [MAX_COMPANY_SIZE];
The employee_t is a structure typedef for struct employee. The struct employee contains the
following fields
• name - array of MAX_NAME_SIZE chars (string)
• fte - a float between 0.0 and 1.0
• birthday - a structure of date_t type as defined below.
The variable fte indicates if an employee works full-time or part-time for a company. The
value fte=1.0 (or 0.5) indicates that an employee works full time (or half-time) for the
company.
Note that we now have a struct nested within a struct. The birthday is a structure typedef
for struct date. The struct date_t contains the following fields,
• day - unsigned integer between 1 and 31 (inclusive)
• month - unsigned integer between 1 and 12 (inclusive)
• year - unsigned integer between 1800 and 2017
Your program interacts with the nested struct array in your memory (RAM) and simple
database file in your hard disk. It should provide the following features:
- add employee
Add a new employee to the employeelist through the terminal. You should collect the input
by asking multiple questions from the user.
Enter name>
Enter birthday: day>
Enter birthday: month>
Enter birthday: year>
Enter FTE> - delete last employee
Remove the last employee from the employeelist. TIP: you cannot delete an element from an
array. Instead consider using an integer to keep count of number of employees. display employee list
Display the list of employees in the following format as shown in the sample run. Please
follow the sample executable for the exact display format, including white spaces.
Name Birthday FTEbee 10-01-1800 1.0000
Pay attention to the strict formatting guide:
• Name - left aligned, 10 chars at most.
• Date - 2 digit day, 2 digit month, 4 digit year
• FTE – 4 decimal places- save the employee list to the database file
Save the employeelist in the hard disk as a binary/text file named database. You may use
your own format to save the data. You should overwrite if database file already exists. - read the employee list from the database file
Read the database file and put the data into employeelist. You may only read the data files
created by your own program. You should overwrite the employeelist array you had in
memory when loading from the file. - exit the program
Exit the interactive program.
The database file
It is up to you to create your own data storage format for the database file. Your program
should be able to read the database that was created by itself. You can create the database as a
text or binary file.
You do NOT need to be able to create a database identical to the database of the sample
executable. You do NOT need to be able to read the database of the sample executable.
Your approach
First step for the assignment should be to read this specification very carefully. Then play
with the sample executable. Understand how it works, try different inputs. You will only
understand the task fully if you spend a reasonable time experimenting with the executable.
Breakdown the task into small measurable subtasks that can be achieved with functions, and
then implement one at a time. Begin by taking small steps. Create a program that does not
necessarily do all that is eventually required. Add to it slowly and methodically testing it on
each occasion. Do not try to write a program that meets all the requirements in one step - this
will not save you time.
TEST TEST TEST! Testing is a core part of programming. You should thoroughly test your
program to make sure the behaviour is identical to the sample executable. We will provide
you with test cases - think yourself. The more testing you do, higher your chances are to get a
good grade for the functionality.
If your program crashes unexpectedly, or it runs but does not give the correct output, then
you need to think of using a debugging strategy to determine the nature of the fault. For
example, you can place printf() statements at significant points in your source code to print
messages enabling you to trace execution of the program. You can also use comment
delimiters to temporarily remove parts of the source code from the compilation process.
You will lose marks if you do not follow the instructions in the template file. Do NOT hardcode
your solution.
When writing the code, the first step is to define the struct employee and struct date with the
fields mentioned above - do NOT add extra fields. Inside the main, you can define
the employeelist as an array of employee_t type - do NOT define this array as a global
variable. To start with, assume all user input is perfect (within the range, correct datatype).
Work on adding an employee, then on displaying the employeelist. You could then
progressively work your way through other features.
Do not worry about some months not having dates 29-31 and leap years. That means 30-02- is a real date, although the month of Feb does not have a day 30. Only the range
conditions mentioned before apply.
All strings in C should be null-terminated i.e. the last character should always be ''\0''. The
name field in employee_t should be allocated MAX_NAME_SIZE number of chars.
However because the last character is ''\0'', the actual length of the name that can be stored
is MAX_NAME_SIZE-1. Example:
Enter name>Bee1 *Jayawickrama
The employee.name field will store only the first MAX_NAME_SIZE-1 (=10,
if MAX_NAME_SIZE is 11) characters including spaces and any other
character: {''B'',''e'',''e'',''1'','' '',''*'',''J'',''a'',''y'',''a'',''\0''}
Note that the database file is assumed to be error free. However, your program should
handle: “careless users” – a user may enter a value outside the expected range for any
interactive input. Example:
Enter your choice>0
Invalid choice.
Or a careless user may try to input 365 as the month the user was born (month should be
between 1 and 12). Or try to delete an employee when it is empty, etc.
I suggest initially attempt all features without worrying about careless users and having
spaces in names. Then build on top of that if you still have time in hand. Note that you are
expected to think yourself how a careless user could break your program - we will not
provide test cases.
NOTE: Handling spaces in name is aimed for advanced students. You may need to do your
own research, but more than that you may have to be creative. By using incorrect techniques
you could very well introduce more bugs in your code and it could be time consuming. The
special techniques required for this purpose are not examinable.
Marking Criteria
Criterion Weight
Following good coding practices 50%
Functionality of the program 50%
50% - following good coding practices
Follow the good coding practices listed under LAB01 Task 3. Your code will be manually
marked by tutors for the ability to follow this list of good coding practices. The coding style
will be checked in the Ed environment under default GEDIT configuration discussed
in LAB00 task 2.
To achieve marks for the good coding practices, your submission should not be trivial and
you need to attempt to address the task sufficiently. e.g. if the submission is a blank C
program that follows all applicable good practices listed in LAB01 Task 4, you will not
receive marks for good coding practices.
Rubrics for coding practices:
Criteria level 1 (1/3) level 2 (2/3) level 3 (3/3)
Commenting Level of commenting
is inappropriate.
Reasonable level
of commenting in
most parts.
Good level of
commenting,
explains the logic
behind the code
where necessary.
Indentation
Indentation is mostly
flawed, under the
default 48430 Gedit
configuration.
Indentation
appears mostly
correct, under the
default 48430
Gedit
configuration.
Indentation appears
correct, under the
default 48430 Gedit
configuration.
Code width
Code width mostly
does not follow 80
character limit
(common GNU
practice).
Code width is
above 80
characters in some
places (common
GNU practice).
Code width is 80
characters.
Variable/function
names
Names chosen for
variables, functions
and function
parameters are not
self-explanatory.
Names chosen for
variables,
functions and
function
parameters are
mostly selfexplanatory.
Names chosen for
variables, functions
and function
parameters are selfexplanatory.
Use of global
variables
Unnecessary usage of
global variables.
Unnecessary usage
of global variables
has been avoided.
Use of
preprocessing
directives
Pre-processing
directives such asdefine should be
used more.
Good use of #define
and other preprocessing
directives.
Use of predefined
library functions
Next to the #include
statements you
should list all
functions you use
from the libraries.
Correctly listed the
functions used from
the libraries next to
the #include
statements.
Breaking into
functions
Purpose of most
functions is not
specific enough.
Program has been
mostly broken into
sensible functions
with specific tasks.
Program has been
broken into sensible
functions with
specific tasks.
Function
descriptions
Function descriptions
are mostly
insufficient.
Function
descriptions could
better describe
"what" it does and
"what"
input/output
parameters are.
Function
descriptions provide
a good insight to
"what" it does and
"what" input/output
parameters are.
Passing variables
to functions
Read-only
arrays/pointers are
not passed with the
const keyword.
Where appropriate,
read-only
arrays/pointers are
passed with the
const keyword.
Usage of
structures
A new data type for
the structure has not
been defined using
typedef, and/or it
does not follow the
naming convention
ending with _t.
A new data type for
the structure has
been defined using
typedef, and it
follows the naming
convention ending
with _t.
The sum of above marks will produce 10/20 of the marks for this assignment (10% of the
grade in this subject).
50% - functionality of the program
14 Test cases will be used to mark the functionality, all tests carry equal marks and the total
marks out of 14 will be scaled to 10% of the grade in this subject i.e. (passed tests/14) *10 .
Functionality of your program will be checked by a series of automated tests done on Ed. The
outcome of each test could be:
• PASS - behaviour of your program is identical to the sample executable on Ed
• FAIL - behaviour of your program is different by at least one character
Ed has been configured as follows, until the deadline:
• You will know the PASS/FAIL outcome of each test immediately after
submission, allowing you to fix the program before the deadline.
• You have unlimited attempts to see the PASS/FAIL status of each test.
• Ed will NOT show the test inputs, and it will NOT show the diff comparison for
you.
• Think about possible test cases yourself and compare your solution with the
sample executable.
Ed has been configured as follows, 5 days after the deadline:
• Feedback show the failed test cases.
• No longer accepting submissions
Do NOT hardcode your answers. Tutors will manually check all the submissions. If you
hardcode your solution, tutors may change your functionality marks to 0.
NO exceptions to the above criteria will be made under any circumstances.
Compilation Requirement
We will include all compilation flags we have been using throughout the semester.
gcc -Wall -Werror -ansi -o employeelist.out employeelist.c -lm
We will compile your code on Ed as follows
gcc -Wall -Werror -ansi -o build/employeelist.out employeelist.c -lm
Your program must compile with NO errors and NO warnings on Ed. Failing this, Ed will not
run any of the functionality tests, hence you will receive 0 marks for the functionality. But we
will still mark the coding style.
Libraries Requirement
You are free to use the following C libraries in this assignment:
stdio.h
stdlib.h
string.h
You do not necessarily have to use all of them. However, you will receive 0 marks for the
functionality if you use any libraries other than those listed above.
Submission
Your submission will be via Ed. You should submit only one C file named employeelist.c.
Do NOT submit executable files, other file types, and other C files with different names.
You will get 0 marks for the assignment if this requirement is not met.
Due Date
The Ed submission link will show the deadline of the assignment.
Late Submissions
Standard FEIT late submission penalties apply - check the subject outline for more
information.
Feedback
You will receive the following feedback within 3 weeks of the due date:
• Overall mark for the assignment on Canvas Marks.
• Approximately 5-10 comments about the coding style on Canvas Marks.
• Outcome of automated functionality tests on Ed.
Request to Review
If you are confident that there are substantial irregularities in your marks, you may email the
lab tutors (not the subject coordinator) to lodge a request to review from your UTS student
email. This should be done no later than 1 week after releasing the results on Canvas.
Request to review could very well result in marks being left unchanged or even decreased if
we find that we have been too lenient.
Plagiarism
ALL work you submit must be your own. We take plagiarism very seriously. Why you
shouldn''t plagiarise?
• This is an individual assignment.
• I will use plagiarism detection software to check that you did not copy parts of the
solution from previous submissions, other students in the class, online forums and
other online resources.
• If any submission has a high similarity from the plagiarism detection software, the
submission will be submitted as a misconduct case to university and the result of
this assessment and the subject will be withheld until the misconduct case is
resolved.
Tips
• Read the specification very carefully.
• Run the sample executable on Ed. You may need to setup file permissions. See
LAB01 Task 2.
• Breakdown the task into functions and implement one at a time.
• Do the exit program feature first. Then add employee and display employeelist
features.
• Do the complete assignment without considering the format of the careless users,
then think about it.
• Nested structure definition was covered in Forum 05 - Structures and file
processing.
• You will need to use a fixed size array with a maximum size to emulate a variable
sized array. The source code in Forum 04 - Arrays and strings has everything you
need for this.
• Do NOT define the employeelist array as a global variable.
• The assignment can be done without using pointers. But if you want to use
pointers, of course you can.
• Suppose you make a mistake in printing the choices menu. Instead of "6. exit the
program", you print "6 exit my program now". This message will be printed in
each test, hence you will fail all tests and receive 0 marks for the functionality of
your program.
• Submit to Ed early! It shows the outcome of each test case (Pass/Fail)
immediately.
WX:codehelp
efi系统分区是什么?efi系统分区如何分配盘符?efi系统分区怎么删除?
在Win8系统到现在的Win10系统,用户逐渐的发现自己的电脑上都会有一个efi系统分区,那么efi系统分区有什么作用呢?在系统启动-运行中又扮演什么角色?很多用户发现无法为efi系统分区分配盘符,那么有什么方法可以为efi分区指定盘符?又如何删除efi系统分区,删除会有什么影响呢?带着这些问题,我们一起来学习一下关于efi系统分区的相关知识。
Pig系统分析(2)
Pig哲学之一——Pigs Eat Anything。Pig能够从不同数据源加载数据,能够处理不同式的数据。Pig使用Loader/Store进行数据加载和存储,可选地使用Schema指定数据列名称和类型。如果加载数据时不指定Schema,数据列未命名,类型默认是字节数组(bytearray),在后
pig哲学之一——pigs eat anything。pig能够从不同数据源加载数据,能够处理不同格式的数据。pig使用loader/store进行数据加载和存储,可选地使用schema指定数据列名称和类型。如果加载数据时不指定schema,数据列未命名,类型默认是字节数组(bytearray),在后续操作中,pig可以通过位置参数引用数据列,会根据在数据列上进行的操作进行自动类型转化。从性能和可读性考虑,最好在加载数据时指定schema。
Loader体系
Loader的基类是org.apache.pig.LoadFunc,规定了Loader需要实现的接口,并提供了一些默认实现。下图是Loader的继承体系,针对不同数据源,Pig实现了大量Loader,包括HBaseStorage和ParquestLoader等,能够处理列式存储。默认的Loader是PigStorage。
org.apache.pig.LoadFunc中的三个基本的方法决定了Where/What/How:
public abstractvoidsetLocation(String location, Job job) throws IOException public abstractInputFormat getInputFormat() throws IOException public LoadCaster getLoadCaster() throws IOException { return new Utf8StorageConverter(); }
- 指定加载位置。
- 指定数据源类型,使用HDFS的InputFormat处理不同数据源。
- 如何处理数据从字节数组到实际类型的转化,默认使用Utf8StorageConverter
PigStore分析
1) 处理压缩格式,通过加载文件后缀加载不同的InputFormat:
@Override public InputFormat getInputFormat() { if(loadLocation.endsWith(".bz2") || loadLocation.endsWith(".bz")) { return newBzip2TextInputFormat(); } else { return newPigTextInputFormat(); } }
public void prepareToRead(RecordReader reader,PigSplit split) @Override public Tuple getNext() throws IOException
3) Schema处理,在getNext方法中,如果存在Schema,会对元组应用applySchema方法,给元组中的数据项指定名称和类型。
其他重要接口
通过实现其他一些接口,Loader能提供一些附加功能
LoadMetaData
- 通过getSchema方法自动加载Schema
- 通过getPartitionKeys方法设置数据的分区键,把用户查询条件中的分区键通过setPartitionFilter直接传递给Loader,减少数据加载。参见HCatLoader中实现,注:org.apache.hcatalog.pig.HCatLoader
LoadPushDown
在使用RCFile等基于列格式文件时,如果每次都加载所有列对性能影响较大。如果实现了LoadPushDown接口,优化器会将所需要用到的字段传递给pushProjection方法。
LoadCaster
自定义字节数组到Schema中数据类型的转换,通过一系列方法能够自定义字节数组到到Pig的标量和复杂数据类型的转化。默认实现为Utf8StorageConverter,其中的复杂数据类型格式固定,比如元组格式为(),map格式为[],bag为{}。
Store体系
与org.apache.pig.LoadFunc对应,Pig中也存在org.apache.pig.StoreFunc抽象类。由于不少Loader(比如默认的PigStorage)同样实现了store功能,受Java单继承的限制,Pig提供了StoreFuncInterface接口。
Store的实现与Loader对应,将实际输出操作委托给OutputFormat。值得注意的是,与LoadMetadata对应,Pig也提供了StoreMetadata接口用于处理元数据的存储。.
Schema结构
Schema描述了一个数据集合每一行的列名称和数据类型,其中每一个列信息用FieldSchema表示。FieldSchema通常包括列名称、数据类型,如果列本身是bag的话,FieldSchema还会拥有自己的Schema。
参考价值
- 目前Pig针对逻辑执行计划的优化器都是基于规则的,如果要实现基于代价的优化,需要更多关于数据的统计信息,那么加载和存储数据应该是重要入口和出口。在LoadMetadata/StoreMetadata接口中已经存在getStatistics/setStatistics方法,ResourceStatistics包含行数、行大小、列直方图、区分度等统计信息,不过现在在PigStorage中是空实现。
- 如果要实现Pig On Spark,Loader体系中需要加入RDD层,演变为Loader-RDD-HDFS三层结构。HDFS存储可以考虑ORCFile等列式存储格式,基于成本的优化可以参考Hive中的实现
UML实例(三):在线购物系统分析鲁棒图
分析类图文档:
1.图形文档
2.文字说明
该部分由以下部分组成:类图综述、类描述、类联描述、继承描述、依赖描述和其他与类图有关的说明。
(1)类图综述
类图是对系统所抽象出来的实体的属性行为的描述以及实体与实体间的关联关系。该分析类图说明了在线购物系统的概念模型,表现了在线购物系统该有的责任和目的。
(2)类描述
该分析类图主要包括三种类,即:边界类(Boundary),控制类(Control),实体类(Entity)。
·边界类(Boundary)
类的整体说明
边界类:由用户界面窗口,系统接口,硬件接口组成的系统边界
1、
属性说明:
类名:用户登录窗口
属性:账号
属性含义:用户的手机号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:密码
属性含义:用户用于登录验证的密码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:登录
操作作用:用于用户登录系统
可见性:公有(public)
参数列表:账号、密码
返回类型:布尔型(bool)
约束条件:无
关系说明:与客户有关联关系和依赖关系,与登录控制类有关联关系和依赖关系
定义对象:用户登录窗口{用户登录窗口,用于用户登录}
2、
属性说明:
类名:注册窗口
属性:账号
属性含义:用户的手机号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:密码
属性含义:用户用于登录验证的密码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:用户名
属性含义:用户在系统中所使用的名字
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:注册
操作作用:用于用户注册账号
可见性:公有(public)
参数列表:账号、密码、用户名
返回类型:布尔型(bool)
约束条件:无
关系说明:与用户有关联关系和依赖关系,与注册控制类有关联关系和依赖关系
定义对象:注册窗口{注册窗口,用于用户注册账号}
3、
属性说明:
类名:搜索窗口
属性:关键字
属性含义:用于搜索商品的模板信息
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:关键字类型
属性含义:关键字的类型信息
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:搜索商品
操作作用:用于用户搜索商品
可见性:公有(public)
参数列表:关键字、关键字类型
返回类型:商品信息列表
约束条件:无
关系说明:与用户有关联关系和依赖关系,与搜索商品控制类有关联关系和依赖关系
定义对象:搜索窗口{搜索窗口,用于用户搜索商品}
4、
属性说明:
类名:订单维护窗口
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:查询
操作作用:用于用户查询订单
可见性:公有(public)
参数列表:订单号
返回类型:订单信息列表
约束条件:无
操作名:删除
操作作用:用于用户删除订单
可见性:公有(public)
参数列表:订单编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与用户有关联关系和依赖关系,与订单维护控制类有关联关系和依赖关系
定义对象:订单维护窗口{订单维护窗口,用于用户维护订单信息}
5、
属性说明:
类名:退货处理窗口
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货处理
操作作用:用于商家处理退货事务
可见性:公有(public)
参数列表:订单号
返回类型:布尔型(bool)
约束条件:无
关系说明:与商家有关联关系和依赖关系,与退货处理控制类有关联关系和依赖关系
定义对象:退货处理窗口{退货处理窗口,用于商家处理退货事务}
6、
属性说明:
类名:商品管理窗口
属性:用户名
属性含义:商家的用户名字
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:商品
属性含义:商品信息对象
数据类型:商品
可见性:私有(private)
多重性:1...1
操作说明:
操作名:上架商品
操作作用:用于商家上架商品
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
操作名:修改商品
操作作用:用于商家修改已上架商品信息
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
操作名:删除商品
操作作用:用于商家删除已上架商品信息
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与商家有关联关系和依赖关系,与商品管理控制类有关联关系和依赖关系
定义对象:商品管理窗口{商品管理窗口,用于商家管理商品信息}
7、
属性说明:
类名:退货窗口
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货申请
操作作用:用于对已购买商品(或已支付订单)申请退货
可见性:公有(public)
参数列表:订单号
返回类型:布尔型(bool)
约束条件:无
关系说明:与顾客有关联关系和依赖关系,与退货控制类有关联关系和依赖关系
定义对象:退货窗口{退货窗口,用于对已购买商品(或已支付订单)申请退货}
8、
属性说明:
类名:支付窗口
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:支付金额
属性含义:表示所要支付的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:支付
操作作用:用于对指定订单进行支付
可见性:公有(public)
参数列表:订单号、支付金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与顾客有关联关系和依赖关系,与支付控制类有关联关系和依赖关系
定义对象:支付窗口{支付窗口,用于对指定订单进行支付}
9、
属性说明:
类名:购物车管理窗口
属性:用户名
属性含义:顾客的用户名字
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:数量
属性含义:表示对应某件商品的数量
数据类型:整型(int)
可见性:私有(private)
多重性:1...*
操作说明:
操作名:增加
操作作用:用于把指定数量的商品添加到顾客的购物车
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
操作名:修改
操作作用:用于修改顾客购物车中指定商品信息
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
操作名:删除
操作作用:用于删除顾客购物车中指定商品
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与顾客有关联关系和依赖关系,与购物车管理控制类有关联关系和依赖关系
定义对象:购物车管理窗口{购物车管理窗口,用于管理顾客的购物车}
10、
属性说明:
类名:对外系统退货处理接口
属性:退款金额
属性含义:要退货的订单的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货退款
操作作用:向第三方支付系统发出退货退款操作
可见性:公有(public)
参数列表:退款金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与第三方支付系统有关联关系和依赖关系,与退货处理控制类有关联关系和依赖关系
定义对象:对外系统退货处理接口{对外系统退货处理接口,用于向第三方支付系统发出退货退款操作}
11、
属性说明:
类名:对外系统支付接口
属性:支付金额
属性含义:要支付的订单的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:支付
操作作用:向第三方支付系统发出支付操作
可见性:公有(public)
参数列表:支付金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与第三方支付系统有关联关系和依赖关系,与支付控制类有关联关系和依赖关系
定义对象:对外系统支付接口{对外系统支付接口,用于向第三方支付系统发出支付操作}
·控制类(Control)
类的整体说明
控制类:有着用户界面,系统接口,硬件接口等的作用用来协调用例的行为。
1、
类名:用户登录窗口
属性:账号
属性含义:用户的手机号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:密码
属性含义:用户用于登录验证的密码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:用户输入登录信息登录系统
操作名:登录
操作作用:用于用户登录系统
可见性:公有(public)
参数列表:账号、密码
返回类型:布尔型(bool)
约束条件:无
关系说明:与用登录窗口有关联关系和依赖关系
定义对象:登录
2、
属性说明:
类名:注册
属性:账号
属性含义:用户的手机号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:密码
属性含义:用户用于登录验证的密码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:用户名
属性含义:用户在系统中所使用的名字
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:用户输入注册信息进行注册
操作名:注册
操作作用:用于用户注册账号
可见性:公有(public)
参数列表:账号、密码、用户名
返回类型:布尔型(bool)
约束条件:无
关系说明:与注册窗口有关联关系和依赖关系
定义对象:注册
3、
属性说明:
类名:搜索商品
属性:关键字
属性含义:用于搜索商品的模板信息
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:关键字类型
属性含义:关键字的类型信息
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:用户输入关键字进行搜索商品
操作名:搜索商品
操作作用:用于用户搜索商品
可见性:公有(public)
参数列表:关键字、关键字类型
返回类型:商品信息列表
约束条件:无
关系说明:与商品有关联关系,与搜索窗口有关联关系和依赖关系
定义对象:搜索商品
4、
属性说明:
类名:订单维护
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:查询
操作作用:用于用户查询订单
可见性:公有(public)
参数列表:订单号
返回类型:订单信息列表
约束条件:无
操作名:删除
操作作用:用于用户删除订单
可见性:公有(public)
参数列表:订单编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与订单维护窗口有关联关系和依赖关系
定义对象:订单维护
5、
属性说明:
类名:订单查询
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:查询
操作作用:用于用户查询订单
可见性:公有(public)
参数列表:订单号
返回类型:订单信息列表
约束条件:无
关系说明:与订单有关联关系,与订单维护控制类有关联关系和依赖关系
定义对象:订单查询
6、
属性说明:
类名:订单删除
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:删除
操作作用:用于用户删除订单
可见性:公有(public)
参数列表:订单编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与订单有关联关系,与订单维护控制类有关联关系和依赖关系
定义对象:订单删除
7、
属性说明:
类名:退货处理
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:退款金额
属性含义:要退货的订单的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货确认
操作作用:用于商家处理退货事务
可见性:公有(public)
参数列表:订单号
返回类型:布尔型(bool)
约束条件:无
关系说明:与订单有关联关系,与退货处理窗口有关联关系和依赖关系
定义对象:退货处理
8、
属性说明:
类名:商品管理
属性:商品
属性含义:商品信息对象
数据类型:商品
可见性:私有(private)
多重性:1...1
操作说明:
操作名:上架
操作作用:用于商家上架商品
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
操作名:修改
操作作用:用于商家修改已上架商品信息
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
操作名:删除
操作作用:用于商家删除已上架商品信息
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品管理窗口有关联关系和依赖关系
定义对象:商品管理
9、
属性说明:
类名:上架商品
属性:商品
属性含义:商品信息对象
数据类型:商品
可见性:私有(private)
多重性:1...1
操作说明:
操作名:上架
操作作用:用于商家上架商品
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品有关联关系,与商品管理控制有关联关系和依赖关系
定义对象:上架商品
10、
属性说明:
类名:修改商品
属性:商品
属性含义:商品信息对象
数据类型:商品
可见性:私有(private)
多重性:1...1
操作说明:
操作名:修改
操作作用:用于商家修改已上架商品信息
可见性:公有(public)
参数列表:商品
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品有关联关系,与商品管理控制类有关联关系和依赖关系
定义对象:修改商品
11、
属性说明:
类名:删除商品
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:删除
操作作用:用于商家删除已上架商品信息
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品有关联关系,与商品管理控制类有关联关系和依赖关系
定义对象:删除商品
12、
属性说明:
类名:退货
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货申请
操作作用:用于顾客对已购买商品(或已支付订单)申请退货
可见性:公有(public)
参数列表:订单号
返回类型:布尔型(bool)
约束条件:无
关系说明:与订单有关联关系,与退货窗口有关联关系和依赖关系
定义对象:退货
13、
属性说明:
类名:支付
属性:订单号
属性含义:用于唯一确定订单的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:支付金额
属性含义:表示所要支付的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:支付
操作作用:用于对指定订单进行支付
可见性:公有(public)
参数列表:订单号、支付金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与订单有关联关系,与支付窗口有关联关系和依赖关系
定义对象:支付
14、
属性说明:
类名:立即支付
属性:支付金额
属性含义:表示所要支付的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:立即支付
操作作用:用于对顾客在浏览商品时选中选中的商品立即进行支付
可见性:公有(public)
参数列表:支付金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与支付控制类有关联关系和依赖关系
定义对象:立即支付
15、
属性说明:
类名:订单支付
属性:支付金额
属性含义:表示所要支付的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:支付
操作作用:用于对指定订单进行支付
可见性:公有(public)
参数列表:支付金额
返回类型:布尔型(bool)
约束条件:无
关系说明:与支付控制类有关联关系和依赖关系
定义对象:支付
16、
属性说明:
类名:购物车管理
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:数量
属性含义:表示对应某件商品的数量
数据类型:整型(int)
可见性:私有(private)
多重性:1...*
操作说明:
操作名:增加
操作作用:用于把指定数量的商品添加到顾客的购物车
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
操作名:修改
操作作用:用于修改顾客购物车中指定商品信息
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
操作名:删除
操作作用:用于删除顾客购物车中指定商品
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与购物车管理窗口有关联关系和依赖关系
定义对象:购物车管理
17、
属性说明:
类名:添加购物车商品
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:数量
属性含义:表示对应某件商品的数量
数据类型:整型(int)
可见性:私有(private)
多重性:1...*
操作说明:
操作名:添加
操作作用:用于把指定数量的商品添加到顾客的购物车
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品、购物车有关联关系,与购物车管理控制类有关联关系和依赖关系
定义对象:添加商品购物车
18、
属性说明:
类名:修改购物车商品
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:数量
属性含义:表示对应某件商品的数量
数据类型:整型(int)
可见性:私有(private)
多重性:1...*
操作说明:
操作名:修改
操作作用:用于修改顾客购物车中指定商品信息
可见性:公有(public)
参数列表:商品编号、数量
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品、购物车有关联关系,与购物车管理控制类有关联关系和依赖关系
定义对象:修改购物车商品
19、
属性说明:
类名:删除购物车商品
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
操作说明:
操作名:删除
操作作用:用于删除顾客购物车中指定商品
可见性:公有(public)
参数列表:商品编号
返回类型:布尔型(bool)
约束条件:无
关系说明:与商品、购物车有关联关系,与购物车管理控制类有关联关系和依赖关系
定义对象:删除购物车商品
·实体类(Entity)
类的整体说明
实体类:储存着系统的属性信息及其相关的行为。
1、
属性说明
类名:用户
属性:账号
属性含义:用户的手机号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:密码
属性含义:用户用于登录验证的密码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:用户名
属性含义:用户在系统中所使用的名字
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:登录
操作作用:显示用户登录窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作名:注册
操作作用:显示注册窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作名:搜索商品
操作作用:显示搜索窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作名:订单维护
操作作用:显示订单维护窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
关系说明:与登录窗口、注册窗口、搜索窗口、订单维护窗口有依赖关系和关联关系
定义对象:{用户,[用户名,密码,账号]}
2、
属性说明
类名:商家
属性:证件号码
属性含义:商家的证件号码,如身份证号码
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:信誉度
属性含义:用于定义商家诚信程度的度量
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:退货处理
操作作用:显示退货处理窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作名:商品管理
操作作用:显示商品管理窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
关系说明:与退货处理窗口、商品管理接口为关联关系和依赖关系
定义对象:{商家,[用户名,密码,账号,证件号,信誉度]}
3、
属性说明
类名:顾客
属性:收货地址
属性含义:顾客购买商品对应发货的收货地址
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:积分
属性含义:顾客的消费积分
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
操作说明:
操作名:购物车管理
操作作用:显示购物车管理窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作名:退货
操作作用:显示退货窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
操作作用:显示支付窗口
可见性:公有(public)
参数列表:无
返回类型:空(void)
约束条件:无
关系说明:与购物车管理窗口、退货窗口、支付窗口为关联关系和依赖关系
定义对象:{顾客,[用户名,密码,账号,收货地址,积分]}
4、
属性说明
类名:第三方支付系统
属性:处理金额
属性含义:要退款或支付的金额
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
关系说明:与对外系统退货处理接口、对外系统支付接口为关联关系和依赖关系
定义对象:{第三方支付系统,[处理金额]}
5、
属性说明
类名:订单
属性:订单号
属性含义:用于唯一确定订单信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:订单时间
属性含义:订单生成时的时间戳
数据类型:时间戳类型(Timestamp)
可见性:私有(private)
多重性:1...1
属性:付款记录
属性含义:用于记录订单状况
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
关系说明:与退货处理订单查询、订单删除、退货、支付、提交订单控制类为关联关系
定义对象:{订单,[订单号,商品编号,订单时间,付款记录]}
6、
属性说明
类名:商品
属性:商品编号
属性含义:用于唯一确定商品信息的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:商品名称
属性含义:商品的名称
数据类型:字符串(String)
可见性:私有(private)
多重性:1...1
属性:商品价格
属性含义:单件商品的出售价格
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
属性:商品销售量
属性含义:用于记录商品的销售出去的数量
数据类型:浮点型(double)
可见性:私有(private)
多重性:1...1
关系说明:与搜索商品、上架商品、修改商品、删除商品、添加购物车商品、修改购物车商品、删除购物车商品为关联关系
定义对象:{商品,[商品编号,商品名称,商品价格,商品销售量]}
7、
属性说明
类名:购物车
属性:商品编号
属性含义:用于唯一确定某商品的标识
数据类型:字符串(String)
可见性:私有(private)
多重性:1...*
属性:数量
属性含义:对应于某商品的选择数量
数据类型:整型(int)
可见性:私有(private)
多重性:1...*
关系说明:与添加购物车商品、修改购物车商品、删除购物车商品为关联关系
定义对象:{购物车,[(商品编号),(数量)]}
(3)关联描述
1.关联名称:用户使用登录窗口
关联类型:二元关联
关联所连接的类:用户、用户登录窗口
关联端点:用户1...1用户登录窗口,公有(public)
2.关联名称:登录窗口关联登录控制
关联类型:二元关联
关联所连接的类:用户登录窗口、登录
关联端点:用户登录窗口1...1登录,公有(public)
3.关联名称:用户使用注册窗口
关联类型:二元关联
关联所连接的类:用户、注册窗口
关联端点:用户1...1注册窗口,公有(public)
4.关联名称:注册窗口关联注册
关联类型:二元关联
关联所连接的类:注册窗口、注册
关联端点:注册窗口1...1注册,公有(public)
5.关联名称:用户使用搜索窗口
关联类型:二元关联
关联所连接的类:用户、搜索窗口
关联端点:用户1...1搜索窗口,公有(public)
6.关联名称:搜索窗口关联搜索商品
关联类型:二元关联
关联所连接的类:搜索窗口、搜索商品
关联端点:搜索窗口1...1搜索商品,公有(public)
7.关联名称:搜索商品关联商品
关联类型:二元关联
关联所连接的类:搜索商品、商品
关联端点:搜索商品1...*商品,公有(public)
8.关联名称:用户使用订单维护窗口
关联类型:二元关联
关联所连接的类:用户、订单维护窗口
关联端点:用户1...1订单维护窗口,公有(public)
9.关联名称:订单维护窗口关联订单维护
关联类型:二元关联
关联所连接的类:订单维护窗口、订单维护
关联端点:订单维护窗口1...1订单维护,公有(public)
10.关联名称:订单维护关联订单查询
关联类型:二元关联
关联所连接的类:订单维护、订单查询
关联端点:订单维护1...1订单查询,公有(public)
11.关联名称:订单查询关联订单
关联类型:二元关联
关联所连接的类:订单查询、订单
关联端点:订单查询1...*订单,公有(public)
12.关联名称:订单维护关联订单删除
关联类型:二元关联
关联所连接的类:订单维护、订单删除
关联端点:订单维护1...1订单删除,公有(public)
13.关联名称:订单删除关联订单
关联类型:二元关联
关联所连接的类:订单删除、订单
关联端点:订单删除1...1订单,公有(public)
(4)继承描述
顾客以及商家继承于用户
一般类:用户
特殊类:顾客、商家
(5)依赖描述
1、
依赖名称:订单维护依赖订单查询
所涉及的类的名称:订单维护、订单查询
类型:包含
附加说明:无
2、
依赖名称:订单维护依赖订单删除
所涉及的类的名称:订单维护、订单删除
类型:包含
附加说明:无
3、
依赖名称:商品管理依赖上架商品
所涉及的类的名称:商品管理、上架商品
类型:包含
附加说明:无
4、
依赖名称:商品管理依赖修改商品
所涉及的类的名称:商品管理、修改商品
类型:包含
附加说明:无
5、
依赖名称:商品管理依赖删除商品
所涉及的类的名称:商品管理、删除商品
类型:包含
附加说明:无
6、
依赖名称:购物车管理依赖添加购物车商品
所涉及的类的名称:购物车管理、添加购物车商品
类型:包含
附加说明:无
7、
依赖名称:购物车管理依赖修改购物车商品
所涉及的类的名称:购物车管理、修改购物车商品
类型:包含
附加说明:无
8、
依赖名称:购物车管理依赖删除购物车商品
所涉及的类的名称:购物车管理、删除购物车商品
类型:包含
附加说明:无
9、
依赖名称:购物车管理依赖提交订单
所涉及的类的名称:购物车管理、提交订单
类型:扩展
附加说明:无
10、
依赖名称:支付依赖立即支付
所涉及的类的名称:支付、立即支付
类型:包含
附加说明:无
11、
依赖名称:支付依赖订单支付
所涉及的类的名称:支付、订单支付
类型:包含
附加说明:无
(6)其他与类图有关的说明
无
今天关于用UML做好系统分析和用uml做好系统分析的方法的介绍到此结束,谢谢您的阅读,有关48430 系统分析、efi系统分区是什么?efi系统分区如何分配盘符?efi系统分区怎么删除?、Pig系统分析(2)、UML实例(三):在线购物系统分析鲁棒图等更多相关知识的信息可以在本站进行查询。
本文标签: