Assignment C# Course
Assignment C# Course
namespace Warehouse
{
class Program
{
if (success == false)
{
Console.WriteLine("Invalid operation: " + input);
Environment.Exit(0);
}
if (option == 1)
{
Console.WriteLine(carstock.GetStockCount());
}
else if (option == 2)
{
Console.WriteLine(carstock.GetTotalValue());
}
else if (option == 3)
{
carstock.OneCarSold();
Console.WriteLine(carstock.GetStockCount());
}
else if (option == 4)
{
Console.WriteLine(carstock.GetStockStatus());
}
else
{
Console.WriteLine("Invalid operation: " + input);
}
Environment.Exit(0);
}
else
{
Console.WriteLine("You are not authorized to access this service");
Environment.Exit(0);
}
}
}
class CarStock
{
public string TypeName { get; set; }
public int Price { get; set; }
public int TotalInStock { get; set; }
TotalInStock = initStock;
Price = 70000;
TypeName = "CarX";
}