Initial commit
This commit is contained in:
commit
b087f272b4
26 changed files with 5345 additions and 0 deletions
33
Numbers/NumberFactory/Factory.cs
Normal file
33
Numbers/NumberFactory/Factory.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using Numbers.NumberFactory.NumberImpls;
|
||||
|
||||
namespace Numbers.NumberFactory;
|
||||
|
||||
/// <summary>
|
||||
/// A factory that creates <see cref="INumbers" /> instances
|
||||
/// </summary>
|
||||
public static class Factory
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates an <see cref="INumbers" /> instance for the given <paramref name="type" />
|
||||
/// </summary>
|
||||
/// <param name="type">Number factory type to create</param>
|
||||
/// <param name="lowerBound">Lower bound of the number range</param>
|
||||
/// <param name="upperBound">Upper bound of the number range</param>
|
||||
/// <returns>Appropriate instance or null if requested type is unknown</returns>
|
||||
public static INumbers Create(NumberType type, long lowerBound, long upperBound)
|
||||
{
|
||||
// TODO
|
||||
return null!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Possible number factory types
|
||||
/// </summary>
|
||||
public enum NumberType
|
||||
{
|
||||
Even,
|
||||
Odd,
|
||||
Square,
|
||||
Prime
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue