First day

This commit is contained in:
2015-06-18 10:52:10 +02:00
parent b28cbf7ad2
commit 1a61a2a7f7
36 changed files with 1566 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using System.Collections.Generic;
namespace StoreData
{
public interface IShoppingCart
{
/// <summary>
/// This method adds a product to the shopping cart
/// </summary>
/// <param name="p">The product to add</param>
void AddProduct(Product p);
/// <summary>
/// Remove product by number
/// </summary>
/// <param name="index">The index of the product to remove</param>
void RemoveProductByNumber(int index);
/// <summary>
/// Clears the entire shopping cart
/// </summary>
void Clear();
/// <summary>
/// Calculate the sum of the cost of all products
/// </summary>
/// <returns></returns>
decimal TotalSum();
/// <summary>
/// Returns true if cart is empty, otherwise false
/// </summary>
bool CartIsEmpty();
List<Product> Products { get; }
}
}