Sunteți pe pagina 1din 9

Software Engineering and Database Lab Manual [2013]

Practical 1
AIM: To design a use case diagram for online shopping system.

THEORY:
Problem Statement: Web Customer a uses some web site to make purchases online in online shopping mall. The customer use cases are View Items, Make Purchase and Client Register. Customer can used a view Items case if customer only wants to find and see some products. This use case could also be used as a part of Make Purchase. Customer Register case allows customer to register on the web site, for example to get some coupons or be invited to private sales. Also customer visit the website as guest. Payment for the purchase can be done either by using credit card and external credit payment service or with PayPal. Customer may search for items, browse catalog, view items recommended for him/her, add items to shopping cart or wish list. Unified Modeling Language or UML is a standard language for specifying, visualizing, constructing and documenting the artifacts of software systems. UML also finds its application in Object Oriented programming. UML is expressed in several diagrams: state, activity, deployment etc to describe a software system efficiently. One of these diagrams constitutes the use case diagrams. The following is the different keyword used in use case digram: 1. Actor 2. UseCase 3. Association 4. Derected Association 5. Generalization 6. Dependency 7. Include 8. Extend 9. System 10. Boundary 11. Package The components in a use case diagram include: 1. Actor Semantics: An actor defines a coherent set of roles that users of an entity can play when interacting with the entity. An actor may be considered to play a separate role with regard to each use case with which it communicates. Example in the use case diagram the actor is customer, user and also the owner of the shop.
VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019 Page 1

Software Engineering and Database Lab Manual [2013]

2. UseCase Semantics: The use case construct is used to define the behavior of a system or other semantic entity without revealing the entitys internal structure. Each use case specifies a sequence of actions, including variants, that the entity can perform, interacting with actors of the entity.

3. Association / Derected Association Semantics: A association is an association among exactly two classifiers (including the possibility of an association from a classifier to itself). . 4. Generalization Generalization is the taxonomic relationship between a more general element (the parent) and a more specific element (the child) that is fully consistent with the first element and that adds additional information. 5. Dependency Semantics A dependency is a type of relationship that signifies that one element, or group of elements, acting as the client depends on another element or group of elements that act as a supplier. It is a weak relationship that denotes that if the supplier is changed the client may be affected. It is a unidirectional relationship. 6. Include Semantics: An include relationship defines that a use case contains the behavior defined in another use case. Example, in this diagram authentication include add item or sell and view recommended item. 7. Extend Semantics An extend relationship defines that instances of a use case may be augmented with some additional behavior defined in an extending use case. Example, in this use case view item extends add to list, search item view recommended item etc. 8. System Boundary Semantics A System Boundary is a type of partition that represents the boundary between the thing you are representing with the use cases (inside the boundary) and the actors (outside the boundary). Its most typical usage is the boundary of an entire system. Use cases can be used to represent subsystems and classes and so the boundary may be more specific than an entire system. A

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 2

Software Engineering and Database Lab Manual [2013] package with a stereotype topLevel can be used as a boundary and name space within the use case model to denote the same thing as the use case boundary. 9. Package Semantics A package is a grouping of model elements. Packages themselves may be nested within other packages. A package may contain subordinate packages as well as other kinds of model elements. All kinds of UML model elements can be organized into packages.

SCREEN SHOTS:
USE CASE DIAGRAM:

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 3

Software Engineering and Database Lab Manual [2013]

Online Shopping: UML Use Case Customer : actor uses some web site to make purchases online. Top level use cases are View Items, Make Purchase and Client Register. View Items use case could be used by customer as top level use case if customer only wants to find and see some products. This use case could also be used as a part of Make Purchase use case. Administrator: The admin is responsible for the creating and verifying accounts which enable the online shopping system. Seller: The person who using the online system is putting his/her manufactured goods for sale which the customer can buy. They must also create an account and the can put items for sale. They can receive their payment via the credit card companies or via the paypal account, both widely used in online payment facilities. PayPal and Credit Services: They are the actors that enable the customer to make online payments. All these use cases are extending use cases because they provide some optional functions allowing customer to find item. Customer Authentication use case is included in View
VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019 Page 4

Software Engineering and Database Lab Manual [2013] Recommended Items and Add to Wish List because both require customer to be authenticated. At the same time, item could be added to the shopping cart without user authentication.

CONCLUSION:
Thus, We have studied the concept of use case diagram of online shopping mall and its different component used in use case.

NAME OF ASSESSING FACULTY: Prof. Ajinkya Raut and Prof. Shrutika. SIGNATURE: ____________________

DATED:

____________________

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 5

Software Engineering and Database Lab Manual [2013]

Practical 2
AIM: To design a class diagram for online shopping system.

THEORY:
The UML methodology is being used extensively in software design and has many types of diagrams for various software design purposes.We only briefly present the basics of UML class diagrams here, and compare them with ER diagrams. In some ways, class diagrams can be considered as an alternative notation to ER diagrams. Additional UML notation and concepts are presented , and in shows how the online shopping mall ER database schema in Figure can be displayed using UML class diagram notation. The entity types in Figure are modeled as classes. An entity in ER corresponds to an object in UML. In UML class diagrams, a class (similar to an entity type in ER) is displayed as a box that includes three sections: The top section gives the class name the middle section includes the attributes; and the last section includes operations that can be applied to individual objects of the class. Operations are not specified in ER diagrams.The designer can optionally specify the domain of an attribute if desired, by placing a colon (:) followed by the domain name or description, as illustrated by the name address and email attributes of customer in figure. A composite attribute is modeled as a structured domain, as illustrated by the Name attribute of customer. Relationship types are called associations in UML terminology, and relationship instances are called links. A binary association (binary relationship type) is represented as a line connecting the participating classes (entity types), and may optionally have a name. A relationship attribute, called a link attribute, is placed in a box that is connected to the associations line by a dashed line. The (min, max) notation described in UML class digram used to specify relationship constraints, which are called multiplicities in UML terminology. Multiplicities are specified in the form min..max, and an asterisk (*) indicates no maximum limit on participation. However, the multiplicities are placed on the opposite ends of the relationship when compared with the notation discussed in er digrams In UML, a single asterisk indicates a multiplicity of 0..*, and a single 1 indicates a multiplicity of 1..1. A recursive relationship is called a reflexive association in UML, and the role nameslike the multiplicitiesare placed at the opposite ends of an association when compared with the placing of role names in digram. In UML, there are two types of relationships: association and aggregation. Aggregation is meant to represent a relationship between a whole object and its component parts, and it has a distinct diagrammatic notation. However, aggregation and association do not have different structural properties, and the choice as to which type of relationship to use is somewhat subjective. In the ER model, both are represented as relationships. UML also distinguishes between unidirectional and bidirectional associations (or aggregations). In the unidirectional case, the line connecting the classes is displayed with an arrow to indicate that only one direction for accessing related objects is needed. If no arrow is displayed, the bidirectional case is assumed, which is the default. For example, if we always expect to access the administarator of a shop starting from a object, we would draw the association line
VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019 Page 6

Software Engineering and Database Lab Manual [2013] representing the user association with an arrow from administarator to user. In addition, relationship instances may be specified to be ordered. For example, we could specify that the employee objects related to each department through the WORKS_FOR association (relationship) should be ordered by their Salary attribute value. Association (relationship) names are optional in UML, and relationship attributes are displayed in a box attached with a dashed line to the line representing the association/aggregation. The operations given in each class are derived from the functional requirements of the application. It is generally sufficient to specify the operation names initially for the logical operations that are expected to be applied to individual objects of a class. As the design is refined, more details are added, such as the exact argument types (parameters) for each operation, plus a functional description of each operation. UML has function descriptions and sequence diagrams to specify some of the operation details, but these are beyond the scope of our discussion. will introduce some of these diagrams. Weak entities can be modeled using the construct called qualified association (or qualified aggregation) in UML; this can represent both the identifying relationship and the partial key, which is placed in a box attached to the owner class. The partial key Dependent_name is called the discriminator in UML terminology,. Qualified associations are not restricted to modeling weak entities, and they can be used to model other situations in UML. This section is not meant to be a complete description of UML class diagrams, but rather to illustrate one popular type of alternative diagrammatic notation that can be used for representing ER modeling concepts.

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 7

Software Engineering and Database Lab Manual [2013]

SCREEN SHOTS:
Class digram:

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 8

Software Engineering and Database Lab Manual [2013]

CONCLUSION:
Thus, We have studied the concept of use case diagram of online shopping mall and its different component used in use case.

NAME OF ASSESSING FACULTY: Prof. Ajinkya Raut and Prof. Shrutika. SIGNATURE: ____________________

DATED:

____________________

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE,Matunga,Mumbai-400 019

Page 9

S-ar putea să vă placă și