Inheritance in shopping mall design C#
<p>I am building a program for a shopping mall in C# where the shopping mall will have several shops. Each shop has a different cost calculation method, e.g.</p>

<p>A pizza shop just calculates the cost from the number of pizzas and/or drinks ordered:</p>

<pre><code>public class PizzaShop
    {
        public double order(int numberOfPizzas, PIZZA pizza, int numberOfDrinks, DRINK drink)
        {
            double costOfPizzas;
            if (pizza == PIZZA.margarita)
            {
                costOfPizzas = 5;
            }
            else
            {
                costOfPizzas = 6;
            }

            // find drinks cost similarly and return the total:
            return (costOfPizzas * numberOfPizzas) + (costOfDrinks * numberOfDrinks);
        }
    }
</code></pre>

<p>(Here PIZZA and DRINK are enums which represent different types of Pizzas and Drinks).</p>

<p>Where the cheese shop calculates the cost from the grams and type of cheese ordered.</p>

<p>So, I was thinking about inheritance in this design. A pizza shop and a cheese shop have the similarity that they are both shops in the shopping and they both calculate cost in some way (have the order method). This way however is different. Therefore the method "order()" will take different parameters for each different shop. This means that I cannot use an interface or an abstract class for my design to represent a General Shop. What would be an elegant way to design this?</p>

<p>Thank you.</p>