|
Public Class SpaghettiRecipe
Inherits BaseRecipe
Private _ingredients As ReadOnlyIngredients
Public Sub New()
MyBase.New()
Dim ingredients As New Ingredients
ingredients.Add(New Spaghetti, 5)
ingredients.Add(New Tomato, 3)
ingredients.Add(New MincedMeat, 1)
_ingredients = New ReadOnlyIngredients(ingredients)
End Sub
Protected Overrides Function CookMeal() As IMeal
Return New SpaghettiMeal
End Function
Public Overrides ReadOnly Property Name As String
Get
Return "Spaghetti"
End Get
End Property
Public Overrides ReadOnly Property NeededIngredients As ReadOnlyIngredients
Get
Return _ingredients
End Get
End Property
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Sander Rossel is a Microsoft certified professional developer with experience and expertise in .NET and .NET Core (C#, ASP.NET, and Entity Framework), SQL Server, Azure, Azure DevOps, JavaScript, MongoDB, and other technologies.
He is the owner of
JUUN Software, a company specializing in custom software. JUUN Software uses modern, but proven technologies, such as .NET Core, Azure and Azure DevOps.
You can't miss
his books on Amazon and
his free e-books on Syncfusion!
He wrote a JavaScript LINQ library,
arrgh.js (works in IE8+, Edge, Firefox, Chrome, and probably everything else).
Check out his
prize-winning articles on CodeProject as well!