Creational Design Patterns

Creational design pattern abstracts the instantiation process. It helps in making the system independent of how its objects are created, composed and represented. Object creation is a complex task. To resolve this problem we have design patterns. You can read more about

Hard coding of the program is not always a good approach for programming. We create the instance using a new keyword. The nature of objects usually changes with respect to the nature of the program. Thus design pattern is essential for instantiation of the object in the application.

Let us see the various different creational design patterns are and how to use these design patterns:

Factory Method Pattern

In factory method design pattern, we define an interface and abstract classes for creating object and we let the subclasses to decide which class to instantiate. In short subclasses are responsible for instantiating the subclasses.
The major advantage of using such a pattern is that subclasses have an option to choose the interface or abstract class for creating object.
Secondly the codes are loosely-coupled, as the class which needs the object creation code will only implement or extend the interface or class.
Let us understand it with help of example

class PGStudent extends Student
{
  long numberOfLectures;
  PGStudent(String name ,String PRN, String specialization,long numberOfLectures)
 {
  super(name,PRN,specialization);
  this.numberOfLectures = numberOfLectures;
 }
  void display()
 {
   super.display();
   System.out.println("No of lectures for PG student : "+numberOfLectures);
  }
 }
  class UGStudent extends Student
  {
    long numberOfLectures;
    UGStudent(String name ,String PRN, String specialization,long numberOfLectures)
    {
         super(name,PRN,specialization);
         this.numberOfLectures = numberOfLectures;
     }
  void display()
   {
      super.display();
      System.out.println("No of lectures for PG student: "+numberOfLectures);
    }
 }
  class GetStudentFactory{
   Public Student getPlan(String studentType)
 {
    if(studentType==null)
    return NULL;
    if(studentType.equalIgnoreCase(“PGStudent”)
    {return new PGStudent;}
   }
  else if(studenttype.equalIgnoreCase(“UGStudent”)
{
   Return new UGStudent;
  }
}

Abstract Factory Pattern

Abstract Factory class is that which defines an interface or abstract class for creating families of related dependent or independent objects. It is similar to Factory method but it produces a collection of the classes or objects.
It is very useful when families of related objects need to be created.System requirement of multiple objects can be fulfilled with the help of abstract factory pattern for creation of family of objects.

Singleton Pattern

Singleton design pattern in Java is used to define a class that has only one instance .The instance can be created at the run time or compile time.
There are two possible ways through which the objects can be created:
  • Early instantiation : Instantiation at the load time.
  • Lazy instantiation: Instantiation whenever required.

Singleton saves memory as the objects are not created at every request. Same object is used every time.
Example of the singleton pattern using JAVA language

class A{ //definition of class A
 private static A obj=new A();
 private A(){}
 public static A get A(){
 return obj;
   }
 public void doSomething(){

   }
}

Builder Pattern

Builder pattern is the pattern through which complex objects are created from simple objects using step by step process.
Basically it provides clear separation between construction and representation of objects. Construction of the code can be done easily with help of Builders pattern. It will support if there is any change in the representation of objects.

Object Pool Pattern

Creation of objects is costly affair. So the basic principle behind the object pool pattern is that an object container has been created and whenever any of the objects are required, we can take object from that container and once there is no object in the container then we put more objects in the container.
A pool is basically used because it manages objects properly.
Some of the advantages of the object pool patterns are as follow:
  • It helps in good performance of the application which has used the object pool pattern.
  • It is the most effective when a bulk of the object’s initialization is required in the application.
  • With the help of Object pool design pattern, we can easily reuse the objects.
  • Object pool design pattern restricts the developer’s use objects.

Read More:
Method Overloading V/s Method Overriding In OOPs
Pros and Cons of Inheritance in OOPS
Advantages & Disadvantages of Polymorphism in Object Oriented Programming

Copyright © ianswer4u.com

What is The Brand Management Process

Branding plays a key role in any marketing plan and a good brand always has a jump start over the competition in any field. Today we will discuss about brand management process and various concepts related to it. This article would just touch upon various terms without going into details. You may like to read some of the other comprehensive articles I wrote about marketing.

Brand Management

Brand is an intangible asset of the company. It is in the form of a logo or a trademark, but it is more than that. Brand strategy involves managing these brands and their value is described by its equity. Brand management approaches are:
  • Brand positioning
  • Brand leveraging

Brand Identity
Brand identity is the first component of brand management and it means how the company wants their brands to be perceived. This is the identity of the brand and what the brand stands for. It helps in establishing a relationship between the brand and customer by providing value.

Brand Image
Brand image is the image of the brand of a company. It can be defined as the reputation of the company and the brand. For example: the brand image of APPLE is extremely good and reputable.

Brand Character
Brand character is a relation with the consumer in terms of the experience it promises to deliver. It is how the brand is perceived in aspects like:
  • Integrity
  • Honesty
  • trustworthiness

Importance of Brand Management

  1.  A good and strong brand can have price premium and therefore earns high margins by charging extra.
  2.  Brands are essential to attract new customers which is important for any business.
  3.  Brands also are an obstacle to upcoming brands as the loyal customers tend to stick to a trusted brand rather than switch over to a new brand.
  4.  Brands also protect the company during economy downturns.
  5.  Brands create goodwill- an intangible but highly important asset.
  6.  Brands enable companies to expand by creating bigger footprints into new markets.

BRAND ACQUISITION:
One company acquires brand of the other companies as it helps to expand their portfolio of brands to expand the market. There are a number of examples in Indian corporate history of brand acquisition.
  • Coca cola which was expelled from India in 1977 and was re-introduced in 1991 in India and acquired Thumbs-up, Limca, Goldspot, Rim-zim.
  • Famous brands of Hamaam and Moti soaps were acquired by Hindustan Unilever.
  • Uncle Chips was acquired by Pepsi.

BRAND REJUVENATION:
Brand rejuvenation means addition of value to an existing brand. This is done by adding values to it which means improving product attributes and enhancing its overall appeal.
It is done to get the attention of the consumers and refocus it to the brand. It helps to overcome boredom and repetition that is seen. Brand is rejuvenated due to psychological desire of the consumers.
The terms often used for such an activity are 'new, 'super', ‘special’, ‘premium’,‘deluxe’,‘extra strong’,‘fresh’,etc.
Brand rejuvenation is nothing but updating of brands.
For example:
• Cadbury’s five star chocolate bar received a fill up through a new creamier and smoother version.
• New Bournvita: To give it a push, Cadbury came out with New Bournvita, with extra glucose in a new packing

6 Components for a Comprehensive Branding Strategy

  • Purpose: Every brand has a purpose, because of which it comes into existence. Example:the purpose of KINLEY as a brand is to provide with quality-drinking water.
  • Consistency: it means a brand needs to be consistent with regards to its value, mission and vision.
  • Emotion: a good brand is one which can establish an emotional connect with its customers.
  • Flexibility: it is another integral component of a brand.
  • Employee involvement: employee involvement plays a big role in branding and its management because employee understands the brand and is treated as a company’s asset.
  • Loyalty: brand loyalty is what is important for it to sustain and grow.

Copyright © ianswer4u.com

Behavioral Design Patterns in Software Design

In the previous article we discussed about in brief about various Software design patterns, their types and why they are helpful in developing a robust software architecture which can be reused. Today we will discuss about behavioral design patterns in OOPs and different types of the behavioral design patterns.

What are behavioral design pattern?

Behavioral pattern concerned with interaction between different objects. Behavioral pattern not only describes the pattern of objects or classes but also the pattern of communication between different objects. Behavioral pattern basically describes the flow of processes. It is a step by step flow of object interaction. It maintains how different objects and classes interact with each other to carry out all processes.

Behavioral pattern uses object compositions rather than inheritance.We use behavioral pattern where a single object could not handle the process but which can be handled by group of objects.

Creational pattern helps in the instantiation of object. Structural pattern helps in the creation of structure of the application and the behavior of the application will be controlled by behavioral pattern.

Different types of the behavioral design patterns

  1. Chain of Responsibility

    The chain of responsibility is a design pattern in which there are multiple handlers which handle the process request. It is typically not possible for one object to process the object sent by other objects. The problem can be resolved with help of Chain of responsibility design pattern. There are multiple processing objects which will handle the process once it is successfully passed from one object to another and it gets passed to the end. Chain of responsibility pattern is applicable where there are multiple objects to handle the processes.There should be more than one object to handle the request. The set of objects which will handle the request should be specified dynamically.
  2. Advantages of Chain of responsibility design pattern

    • Each of the objects is independent of the other. Hence chain of responsibility supports reduced coupling amongst different objects.
    • The codes are more flexible as there are different objects handling different process.
    • As there is no recipient at the end of the process so it is not sure that process will be successfully handled at the end of the process completion.

    Let’s understand this with the help of a real world example.
    Suppose we have a vending machine which accepts coins of any shape and size.In order to do processing of each type of coin we should have specific handlers. The coin of $1 will be handled by one handler and that of 50 Cents will handled by some other handlers. In this way different handlers are used to handle different coins of different weight and size.

  3. Command Pattern

    The command pattern is a design pattern which enables all the information for the request to be stored in a single object.
    Command pattern is a behavioral design pattern in which all information needed to execute a method could be used immediately or held for later use. This object doesn’t execute anything,it only includes information.

    Advantages of the Command design pattern

    • Command pattern supports decoupling as the object implementing the operation and object invoking the functions are unaware of each other.
    • Objects can be easily manipulated and changed.
    • We can easily assemble commands into composite commands
    • It is an easy process to add new commands because we don’t need to change the existing class.

    Suppose we have an oven in which have different functionalities like heating the food, start button, end button, buzzer button. All the functionalities of the oven will be handled by the oven.
  4. Interpreter Pattern

    The interpreter pattern is a design pattern which is used when developing domain-specific languages. This pattern allows the grammar for such domain specific language to be represented in an object-oriented programming.
    Interpreter pattern are applicable where the grammars are simple.
    It basically evaluates the sentence in the languages. The patter is described in term of formal grammar.

    Advantages of interpreter design patterns

    • As the interpreter pattern uses classes to represent language. We can easily use inheritance to change or extend the grammar.
    • Implementation of grammar is easy.
    • Through interpreter pattern we can easily evaluate an expression as per the new requirement.
    • Interpreter can easily handle easy grammar but it is difficult to handle complex grammar.

Read More:
Difference between method Overloading and Overriding in OOPs
How does inheritance work in Java?
Ad-hoc Testing, Monkey Testing & Exploratory Testing
Difference in Drivers and Stubs | Software Testing

Copyright © ianswer4u.com

Brand Equity: Advantages of Strong Brand Equity

What do you mean by Brand Equity ?

Concept of brand equity is still under evolution. Equity is defined as value, perception, imagination and association with performance. Every company wants its product to have very high equity. When this terminology gets converted into financial parameters, we get a value of equity.

Example:
In the month of February 2016, Google has become more valuable than Apple and has become the most valuable company in the world. At the end it’s linked with performance.
Brand Equity is associated with
  • Brand awareness
  • Brand attributes
  • Perceived quality
  • Brand loyalty
Brand equity is a composite word and it is an aggregation of many factors – which also keep evolving and changing. Equity depends upon:
  • Performance
  • Customers increasing preference
  • A momentum
  • Reputation and goodwill

What is meant by Brand Recall?

Brand recall is a very important aspect to brand management as it helps in getting more customers by increasing your customer base and making customers buy your products repeatedly. If a customer has a nice experience with the brand, it is obvious that the customer will buy that brand’s product even when the product is re-launched. This is what a brand recall is. It’s a measure of how well the brand of the company is connected with the people and how well the people can relate them with it. Most importantly, it’s a qualitative measure.

Brand recall is when the in the minds of the consumer, the brand is imprinted. Brand recall is usually categorised into two – aided and un-aided recall. In today’s competitive world, if a customer can remember the brand without any aid, or mention, this means that the brand name is well imprinted and connected with the customer.

Now, the question is, why does a customer need to remember the brand?
It’s because if a customer remembers a brand, there is a high possibility that he will buy that brand. Whereas, if the customer doesn’t recall a particular brand, he will go with the one he remembers. This happens because of a simple logic, i.e. the value of a brand is associated in the memory of the consumer.

Let’s take examples to make it clearer:
  • When we think about shoes as a brand, we think of Adidas, Reebok or Nike. This is one of the best examples of brand recall. This happens automatically and hence we can say it is imprinted in our minds.
  • On asking about your favourite carbonated beverage, people would either say Coca-Cola or Pepsi immediately.
  • In the premium clothing brand who wouldn’t say a Pepe jeans, Zara, Forever 21 or Vero moda.
  • And about premium automobiles, you might think of Mercedes or BMW, which is again obvious.
These are a few brand recall examples of the real world and most importantly this help us take decisions on a daily basis. Thus we can say that for a company to have high brand recall, is very important and can be called a blessing. Let us now look at advantages of building strong brand equity.

Benefits of investing in brand equity

  1. Greater customer loyalty
    Companies should understand that a positive brand can be helpful in driving customer loyalty which is essential to win the market share in great proportion. Customer loyalty helps in minimising customer churn, so once you get a good customer base, you do not need to worry much.
  2. Deeper customer relationships
    It is a fact that when a customer associates with the brand and recalls it, it will be willing to buy it repeatedly. It is a positive brand that helps increase the sales.
  3. Broader brand
    A broader brand means a brand with many products and services, so that it becomes an umbrella of brands. If the brand’s equity is strong, a brand can expand and thus the company will be able to offer more.
  4. Enhanced pricing opportunities
    Brand equity of a strong and successful company can enable them to charge a high price and therefore, earn a higher margin. So, it is said that a strong brand earns a price premium .
    Here, we can take the example of APPLE: Although the iPhones are costly, yet people tend to buy them because along with the product, comes status and position.
Read More:
Advantages and Disadvantages of Telematics Insurance
Revolving Credit V/s Overdraft
How Credit Cards Affect Your Credit Score
What differentiates a BPO from a KPO?

Copyright © ianswer4u.com

Software Design Pattern: Why to use & its types

What is design pattern in software architecture?

A pattern basically describes a problem which occurs over and over again in the environment. It describes the core solution to the problem in such a way that you can use this solution a million times without doing it twice. Design patterns play an important role in Software Engineering Architecture as we try to simply the solutions and reusing the old solutions go a long way in cutting down the costs. A software design pattern acts as a template for future software development projects.

How to use software design pattern in software engineering?

  • Read the pattern once through an overview. Pay special attention to the applicability and consequences of using the design pattern in the application. 
  • Before using the design pattern in the application, it is necessary to understand the classes and objects used in the pattern. 
  • Look at the sample code section to make correct use of the design pattern. 
  • Define the class which uses the design pattern. Interfaces, inheritance relationships and instance variable have to be defined properly.

Types of software design patterns in software architecture

  1. Creational design pattern
    Creational design pattern abstract the instantiation process. They help in making the system independent of how its objects are created, composed and represented. Object creation is a complex task. Design pattern resolves this problem.
    Different types of creational design pattern:
    • Factory Method Pattern
      In factory method design pattern, we define an interface and abstract class for creating the object and we let the sub-classes decide which class to instantiate. In short, sub-classes are responsible for instantiating the sub-classes.
    • Abstract Factory Pattern
      Abstract Factory class is that which defines an interface or abstract class for creating families of related of dependent or independent objects. It is similar to Factory method but it produces a collection of classes or objects.
    • Singleton Pattern
      Singleton design pattern in Java is used to define a class that has only one instance .The instance can be created at run time or compile time.
    • Builder Pattern
      Builder pattern is the pattern through which a complex object is created from simple objects through a step by step process. Basically it provides a clear distinction between construction and representation of objects. Construction of the code can be done easily with help of Builders pattern. It will support if there is any change in the representation of objects.
    • Object Pool Pattern
      Creation of an object is a costly affair. So the basic principle behind the object pool pattern is that an object container has been created and whenever any of the objects is required then we can take object from that container and once there is no object in the container then we put more objects in the container.
  2.  Structural design pattern
    Structural design patterns are ways through which we can describe how classes and objects are composed in an application to form a larger structure. Structural design pattern simplifies the structure of the application by identifying the relationships. It basically focuses on how classes are related to each other via inheritance and how one class is created from other.

    Advantages of Structural design pattern
    • The efficiency of the application increases when we use design pattern
    • Re-usability of the application also increases through the use of structural design pattern
    • Through the use of design pattern in the application, the structure of the application becomes cleaner, simpler interfaces which are easier to understand.

    Below are the different types of structural design pattern
    1. Adapter Pattern
      Adapter pattern is the structural pattern with help of which we can connect two related interfaces together. The interface which joins the two interfaces is known as Adapter.
    2. Bridge Pattern
      Bridge pattern is basically used for separating out the interface from its implementation .Doing this will give flexibility.
    3. Composite Pattern
      Composite pattern is one of the Structural design patterns and is used when we have to represent a part-whole hierarchy. When we need to create a structure, in a way, that the objects are identified correctly. The collection of the object is stored in the class.
    4. Facade Pattern
      Fa├žade Design pattern hides the complexities of the system. A separate interface is used for hiding the complexities of the system and delegate the call to the system classes.
    5. Proxy Pattern
      A class that represents the functionality of another class is a proxy pattern. 

  3.  Behavioral design pattern
    Behavioral patterns are concerned with interaction between different objects. Behavioral pattern not only describes the pattern of objects or classes but also the pattern of communication between different objects. Behavioral pattern basically describes the flow of the process. It is the step by step flow of objects interaction. It maintains how different objects and classes interact with each other to carry out all process.
    Behavioral pattern uses object compositions rather than inheritance .We use behavioral pattern where a single object could not handle the process but which can be handled by group of objects.
    Creational pattern helps in the instantiation of objects. Structural pattern helps in the creation of structure of the application and the behavior of the application will be controlled by behavioral pattern.
    There is different type of the behavioral design pattern:
    • Chain of Responsibility Pattern
    • Command Pattern
    • Interpreter Pattern
    • Mediator Pattern
    • Memento Pattern
    • Observer Pattern
    • State Pattern
    • Strategy Pattern
    • Template Pattern
    • Visitor Pattern
    • Null Object

Advantages of design pattern in software engineering

  • Design pattern allows users to reuse the Software. 
  • Design pattern helps in improving developer communication. 
  • Design pattern captures expert knowledge and widely uses it.

Disadvantages of design pattern in software engineering

  • It is impossible to reuse code of design pattern as it will be complex. 
  • They are validated by experience and discussion. 
  • Memory consumption is more because of generalised format or code without design pattern. 

 Read More:
 Overriding vs. Overloading in OOPs
Types of Polymorphism and advantages
What is a Defect Life Cycle or a Bug life cycle in software testing?
What is software unit testing and why is it important?

Copyright © ianswer4u.com