private static void AddingTools() { Console.Clear(); Tool NewTool = new Tool(); Console.WriteLine("Please enter the tool"); NewTool.Name = Console.ReadLine(); Console.WriteLine("Quantity of tools"); NewTool.Quantity = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("AvailableQuantity of tools"); NewTool.AvailableQuantity = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Number of borrowings"); NewTool.NoBorrowings = Convert.ToInt32(Console.ReadLine()); int num = 0; Int32.TryParse(Console.ReadLine(), out num); //NewTool.AddTool(); ToolCollection newToolCollection = new ToolCollection(); newToolCollection.add(NewTool); MemberMenu(); }
// constructor public Member(string firstName, string lastName, string phoneNum, string pin) { borrowedTools = new ToolCollection("Borrowed Tools"); this.FirstName = firstName; this.LastName = lastName; this.ContactNumber = phoneNum; this.PIN = pin; }