If you want to make money online : Register now
Showing posts with label MCS032. Show all posts
Showing posts with label MCS032. Show all posts
Online railway reservation system use case diagram
MCS032 Solved Assignment

Following are some of the main advantages of Use Case Modeling:

1. The use case diagram provides a comprehensive summary of the whole software system in a single illustration.

2. The use cases are mainly composed of narrative text. Hence, unlike many other modeling techniques, the non technical stake holders (e.g. customers, end users, salesperson etc) are also able understand the model for the software system. This means that feedback can be obtained at a very early stage of the development from the customers and the end users.

3. Another major advantage of use case modeling is that it requires the identification of exceptional scenarios for the use cases. This helps in discovering subtle alternate requirements in the system.

4. The use case model can be utilized in several other aspect of software development as well, e.g. Cost Estimation, Project Planning, Test Case Preparation and User Documentation.

Click below link to see Use Case Diagram

Generalization 

Generalization is a mechanism for combining similar classes of objects into a single, more general class. Generalization is a bottom-up process. Generalization and inheritance are powerful abstractions for sharing similarities among classes while preserving their differences.

Some Forms of Generalization

1. Hierarchy: In the case of hierarchy, the commonalities are organized into a tree structured form. At the root of any subtree are found all the attributes and behavior common to all of the descendents of that root.
2. Genericity: In this case, the commonality is expressed with the aid of a parameter. Various specializations are distinguished by what they provide for the parameter. For example, using genericity it is possible to represent the common properties of a "stack" through the generalization of a "stack of anything", where "anything" represents the parameter.
3. Polymorphism: Polymorphism captures commonality in algorithms. Polymorphism allows the nested logic (or case statement) to be collapsed to a single case in which the different object types are treated in a uniform manner.
4. Patterns: A pattern expresses a general solution (the key components and relationships) to a commonly occurring design problem. The attributes and behavior of the individual components are only partially defined to allow the pattern to be interpreted and applied to a wide range of situations.

Inheritance

The generalization/specialization relationship is implemented in object-oriented programming languages with inheritance. Inheritance is the implementation mechanism for the generalization/specialization relationship. In single inheritance a subclass has only one superclass. In multiple inheritance a subclass has two or more superclasses.

One object-oriented concept that helps objects work together is inheritance. Inheritance defines relationships among classes in an object-oriented language. In other words, Inheritance is the mechanism used in object-oriented programming (OOP) languages to permit a subclass to share attributes and operations defined in the superclasses.

For example the subclass Car can share the attributes and operations from the superclass Vehicle. The subclass Car may add attributes and operations.






The inefficient but correct analysis model can be optimized to make implementation
more efficient. To optimize the design, the following things should be done: 

1. Adding Redundant Associations for Efficient Access

Redundant associations do not add any information, thus during design we should actually examine the structure of object model for implementation, and try to establish whether we can optimize critical parts of the completed system. Can new associations be added, or old associations be removed? The derived association need not to add any information to the network, they help increasing the model information in efficient manner. 
 
We can analyze the use of paths in the association network as follows: 
  •  Evaluate each operation 
  •   Find associations that it must pass through to get information. Associations can be bi-directional (generally by more than one operation), or unidirectional, which can be implemented as pointers.

For each operation, we should know the followings: 
  •  How frequently is the operation needed, and how much will it cost? 
  •  What is the fan-out along a path through the network? To find fan-out of the complete path, multiply the average count of each “many” associations found in the path with individual fan-outs.
  •  What are the objects that satisfy the selection criteria (if specified) and are operated on? When most of the objects are rejected during traversal for some reason, then a simple nested loop may be inefficient at finding target objects. 

2. Rearranging the Execution Order for Efficiency 

As we already know algorithm and data structure are closely related to each other, but data structure is considered as the smallest but very important part of algorithm. 

Thus, after optimizing the data structure, we try to optimize the algorithm itself. In general, algorithm optimization is achieved by removing dead paths as early as possible. For this, we sometimes reverse the execution order of the loop from the original functional model.  

3. Saving Derived Attributes to Avoid Recomputation

 Data which is derived from other data should be stored in computed form to avoid re-computation. For this, we can define new classes and objects, and obviously, these derived classes must be updated if any base object is changed.

OOAD

Object-oriented analysis and design (OOAD) is a popular technical approach for analyzing, designing an application, system, or business by applying the object-oriented paradigm and visual modeling throughout the development life cycles to foster better stakeholder communication and product quality.

Structured Analysis vs. Object Oriented Analysis

The Structured Analysis/Structured Design (SASD) approach is the traditional approach of software development based upon the waterfall model. The phases of development of a system using SASD are:
  • Feasibility Study
  • Requirement Analysis and Specification
  • System Design
  • Implementation
  • Post-implementation Review
Now, we will look at the relative advantages and disadvantages of structured analysis approach and object-oriented analysis approach.

Advantages/Disadvantages of Object Oriented Analysis

AdvantagesDisadvantages
Focuses on data rather than the procedures as in Structured Analysis.Functionality is restricted within objects. This may pose a problem for systems which are intrinsically procedural or computational in nature.
The principles of encapsulation and data hiding help the developer to develop systems that cannot be tampered by other parts of the system.It cannot identify which objects would generate an optimal system design.
The principles of encapsulation and data hiding help the developer to develop systems that cannot be tampered by other parts of the system.The object-oriented models do not easily show the communications between the objects in the system.
It allows effective management of software complexity by the virtue of modularity.All the interfaces between the objects cannot be represented in a single diagram.
It can be upgraded from small to large systems at a greater ease than in systems following structured analysis.

Advantages/Disadvantages of Structured Analysis

AdvantagesDisadvantages
As it follows a top-down approach in contrast to bottom-up approach of object-oriented analysis, it can be more easily comprehended than OOA.In traditional structured analysis models, one phase should be completed before the next phase. This poses a problem in design, particularly if errors crop up or requirements change.
It is based upon functionality. The overall purpose is identified and then functional decomposition is done for developing the software. The emphasis not only gives a better understanding of the system but also generates more complete systems.The initial cost of constructing the system is high, since the whole system needs to be designed at once leaving very little option to add functionality later.
The specifications in it are written in simple English language, and hence can be more easily analyzed by non-technical personnel.It does not support reusability of code. So, the time and cost of development is inherently high.
Read more: http://www.tutorialspoint.com/object_oriented_analysis_design/ooad_object_oriented_analysis.htm

2016 - 2017 Assignment Question

Class diagram

In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.

  • Classes


Classes represent an abstraction of entities with common characteristics. Associations represent the relationships between classes.

  • Active Classes

Active classes initiate and control the flow of activity, while passive classes store data and serve other classes. Illustrate active classes with a thicker border.

  • Visibility

Use visibility markers to signify who can access the information contained within a class. Private visibility, denoted with a - sign, hides information from anything outside the class partition. Public visibility, denoted with a + sign, allows all other classes to view the marked information. Protected visibility, denoted with a # sign, allows child classes to access information they inherited from a parent class.

  • Associations

Associations represent static relationships between classes. Place association names above, on, or below the association line. Use a filled arrow to indicate the direction of the relationship.

  • Multiplicity (Cardinality)

Place multiplicity notations near the ends of an association. 

  • Constraint

Place constraints inside curly braces {}.

  • Composition and Aggregation

Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part. Illustrate composition with a filled diamond.

  • Generalization

Generalization is another name for inheritance or an "is a" relationship. 

Image source https://www.lucidchart.com/pages/class-diagram-for-library-management-system-UML