static void Main(string[] args) { ICustomerManager customerManager = new CustomerManager(); customerManager.AddCustomer("Lars", "19930503", 0); IBookshelfAisleManager BookshelfAisleManager1 = new BookshelfAisleManager(); BookshelfAisleManager1.AddBookshelfAisle(1); IBookshelfAisleManager BookshelfAisleManager2 = new BookshelfAisleManager(); BookshelfAisleManager2.AddBookshelfAisle(2); IBookshelfAisleManager BookshelfAisleManager3 = new BookshelfAisleManager(); BookshelfAisleManager3.AddBookshelfAisle(3); IShelfManager shelfManager1 = new ShelfManager(); shelfManager1.AddShelf(1, 1); IShelfManager shelfManager2 = new ShelfManager(); shelfManager2.AddShelf(2, 2); IShelfManager shelfManager3 = new ShelfManager(); shelfManager3.AddShelf(3, 3); IBookManager bookManager1 = new BookManager(); bookManager1.AddBook("Sagan om ringen", 199); IBookManager bookManager2 = new BookManager(); bookManager2.AddBook("Clean Code", 159); IBookManager bookManager3 = new BookManager(); bookManager3.AddBook("Harry Potter", 179); IBookManager bookManager4 = new BookManager(); bookManager4.AddBook("Nalles stora blåa hus", 200); IBookManager bookManager5 = new BookManager(); bookManager5.AddBook("Bamse", 99); }
static void Main(string[] args) { IAisleManager aisleManager = new AisleManager(); aisleManager.AddAisle(1); aisleManager.AddAisle(2); aisleManager.AddAisle(3); aisleManager.AddAisle(4); IShelfManager shelfManager = new ShelfManager(); var shelf1 = shelfManager.AddShelf(101, 1); var shelf2 = shelfManager.AddShelf(102, 1); var shelf3 = shelfManager.AddShelf(101, 2); var shelf4 = shelfManager.AddShelf(101, 3); var shelf5 = shelfManager.AddShelf(102, 3); var shelf6 = shelfManager.AddShelf(103, 3); IBookManager bookManager = new BookManager(); bookManager.AddBook("Clean Code", "Robert C. Martin", "9780132350884", 452, 2019, 5, shelf1, false); bookManager.AddBook("Peter Pan", "Barrie, J. M.", "9781405279574", 258, 2003, 3, shelf1, true); bookManager.AddBook("Harry Potter och frången från Azkaban", "J.K. Rowling", "9789129704211", 243, 2017, 4, shelf1, false); bookManager.AddBook("Harrp Potter och den vises sten", "J.K. Rowling", "9789129697704", 243, 2015, 3, shelf1, false); bookManager.AddBook("Bränn alla mina brev", "Alex Schulman", "9789188745583", 58, 2019, 5, shelf2, false); bookManager.AddBook("1984", "George Orwell", "9780451524935", 92, 1950, 1, shelf2, false); bookManager.AddBook("Oliver Twist", "Charles Dickens", "9789163802225", 28, 1994, 1, shelf2, false); bookManager.AddBook("Lord of the rings box set", "J.R.R. Tolkien", "9780007581146", 937, 2014, 2, shelf2, false); bookManager.AddBook("Moby Dick", "Herman Melville", "9789187193170", 89, 2016, 3, shelf3, false); bookManager.AddBook("Lord of the flies", "William Goldberg", "9780571200535", 85, 1999, 2, shelf3, false); bookManager.AddBook("To Kill a Mockingbird", "Harper Lee", "9781784752637", 98, 2015, 4, shelf4, false); bookManager.AddBook("Hjärnstark", "Anders Hansen", "9789175038452", 58, 2018, 5, shelf4, true); bookManager.AddBook("Gone Girl", "Gillian Flynn", "9780753827666", 76, 2013, 4, shelf4, false); bookManager.AddBook("Middagstipset", "Jenny Warsén", "9789174247947", 180, 2018, 5, shelf5, true); bookManager.AddBook("Omgiven av idioter", "Thomas Erikson", "9789175038407", 58, 2018, 5, shelf5, true); bookManager.AddBook("Hon som måste dö", "David Lagercrantz", "9789113073743", 189, 2019, 5, shelf5, false); ICustomerManager customerManager = new CustomerManager(); customerManager.AddCustomer("Erika Axelsson", "Restalundsvägen 2", "1996-4-4", 0, null); var guardian1 = customerManager.AddCustomer("Knut Knutsson", "Rudbecksgatan 10", "1974-10-10", 0, null); var guardian2 = customerManager.AddCustomer("Johan Johansson", "Kungsgatan 1", "1982-1-1", 0, null); var guardian3 = customerManager.AddCustomer("Isak Isaksson", "Trädgårdsgatan 6", "1976-10-23", 0, null); customerManager.AddCustomer("Anders Andersson", "Drottninggatan 1", "1965-5-10", 0, null); customerManager.AddCustomer("Lovisa Lund", "Peppargatan 13", "1992-4-11", 0, null); customerManager.AddCustomer("Rebecca Rudolfsson", "Sörbyvägen 3", "1970-1-10", 75, null); customerManager.AddCustomer("Britta Bo", "Oskarsvägen 7", "1950-7-17", 0, null); customerManager.AddCustomer("Kasper Knutsson", "RudbecksGatan 10", "2007-1-15", 0, guardian1); customerManager.AddCustomer("Maja Johansson", "Kungsgatan 1", "2010-4-24", 0, guardian2); customerManager.AddCustomer("Lisa Isaksson", "Bolundstigen 11", "2006-8-8", 0, guardian3); ILoanManager loanManager = new LoanManager(); loanManager.AddLoan(DateTime.Parse("2019-10-21"), DateTime.Parse("2019-11-21"), "Erika Axelsson", "Peter Pan"); loanManager.AddLoan(DateTime.Parse("2019-9-24"), DateTime.Parse("2019-10-24"), "Anders Andersson", "Omgiven av idioter"); loanManager.AddLoan(DateTime.Parse("2019-8-30"), DateTime.Parse("2019-9-30"), "Lovisa Lund", "Middagstipset"); loanManager.AddLoan(DateTime.Parse("2019-10-5"), DateTime.Parse("2019-11-5"), "Lovisa Lund", "Hjärnstark"); loanManager.AddLoan(DateTime.Parse("2019-11-1"), DateTime.Parse("2019-12-1"), "Kapser Knutsson", "Lord of the flies"); Console.WriteLine("Press enter:"); Console.ReadLine(); }
static void Main(string[] args) { IAisleManager aisleManager = new AisleManager(); aisleManager.AddAisle(1); //A-F aisleManager.AddAisle(2); //G-L aisleManager.AddAisle(3); //M-R aisleManager.AddAisle(4); //S-Y aisleManager.AddAisle(5); //Z-Ö IShelfManager shelfManager = new ShelfManager(); var shelf1 = shelfManager.AddShelf(1, 1); //A-B shelfManager.AddShelf(2, 1); //C-D shelfManager.AddShelf(3, 1); //E-F var shelf4 = shelfManager.AddShelf(1, 2); //G-H var shelf5 = shelfManager.AddShelf(2, 2); //I-J var shelf6 = shelfManager.AddShelf(3, 2); //K-L var shelf7 = shelfManager.AddShelf(1, 3); //M-N shelfManager.AddShelf(2, 3); //O-P shelfManager.AddShelf(3, 3); //Q-R var shelf10 = shelfManager.AddShelf(1, 4); //S-T var shelf11 = shelfManager.AddShelf(2, 4); //U-VW shelfManager.AddShelf(3, 4); //X-Y shelfManager.AddShelf(1, 5); //Z-Å shelfManager.AddShelf(2, 5); //Ä-Ö IBorrowManager borrowManager = new BorrowManager(); var borrow1 = borrowManager.AddBorrow(000001, "Circe", new DateTime(2019 - 11 - 01), new DateTime(2019 - 12 - 30)); var borrow2 = borrowManager.AddBorrow(000002, "Flights", new DateTime(2019 - 10 - 30), new DateTime(2019 - 11 - 29)); IBookManager bookManager = new BookManager(); bookManager.AddBook("9781526610140", "Circe", "Madeline Miller", 2019, 199, 4, shelf7, true, borrow1); bookManager.AddBook("9780525534204", "Flights", "Olga Tokarczuk", 2019, 120, 5, shelf10, true, borrow1); bookManager.AddBook("9781782118640", "How to Stop Time", "Matt Haig", 2017, 80, 3, shelf4, false, new Borrow()); bookManager.AddBook("9789129690835", "Trollkarlen från Övärälden", "Ursula K. Le Guin", 2014, 60, 1, shelf6, false, new Borrow()); bookManager.AddBook("9780356508191", "The Fifth Season", "N. K. Jemisin", 2016, 70, 3, shelf5, true, new Borrow()); bookManager.AddBook("9789100170851", "De tre följeslagarna", "Stephen King", 2017, 80, 4, shelf6, true, new Borrow()); var bookNeverwhere1 = bookManager.AddBook("9780747266686", "Neverwhere", "Neil Gaiman", 2013, 50, 1, shelf4, false, new Borrow()); var bookNeverwhere2 = bookManager.AddBook("9780747266686", "Neverwhere", "Neil Gaiman", 2015, 50, 4, shelf4, false, new Borrow()); bookManager.AddBook("9789188945532", "Dödsviskaren", "Lovisa Wistrand", 2019, 60, 4, shelf11, false, new Borrow()); bookManager.AddBook("9781409150763", "King's Cage", "Victoria Aveyard", 2017, 70, 3, shelf1, true, new Borrow()); bookManager.AddBook("9780099740919", "Handmaid's Tale", "Margaret Atwood", 2003, 40, 2, shelf1, true, new Borrow()); ICustomerManager customerManager = new CustomerManager(); customerManager.AddCustomer(000001, "Fanny Uhr", "1996-07-22", "Peppargatan 13", 0, null, false); customerManager.AddCustomer(000002, "Patrik Palmér", "1995-05-30", "Peppargatan 13", 0, null, false); customerManager.AddCustomer(000003, "Leif Eriksson", "1966-04-18", "Logvägen 16", 0, null, false); customerManager.AddCustomer(000004, "Greta Larsson", "1953-09-14", "Storgatan 14", 60, null, false); var guardian1 = customerManager.AddCustomer(000005, "Peter Andersson", "1973-07-14", "Linfrögatan 22", 0, null, true); customerManager.AddCustomer(000006, "Maja Bergman", "2000-07-30", "Drottninggatan 29B", 0, null, false); customerManager.AddCustomer(000007, "Lisa Norén", "1983-04-24", "Bergslagsgatan 13", 0, null, false); customerManager.AddCustomer(000008, "Pontus Andersson", "2008-02-16", "Linfrögatan 22", 0, guardian1, false); var guardian2 = customerManager.AddCustomer(000009, "Sara Magnusson", "1987-12-03", "Lägervägen 12", 0, null, true); customerManager.AddCustomer(000010, "Tindra Magnusson", "2010-03-01", "Lägervägen 12", 0, guardian2, false); customerManager.AddCustomer(000011, "Siri Larsson", "1991-06-30", "Paprikagatan 24", 30, null, false); customerManager.AddCustomer(000012, "Richard Svensson", "1994-11-15", "Anders Wedbergsgatan 3", 0, null, false); customerManager.AddCustomer(000013, "Ingrid Malm", "1954-01-03", "Storsjögatan 14B", 0, null, false); customerManager.AddCustomer(000014, "Hans Hammar", "1952-04-30", "Malmgatan 4C", 0, null, false); customerManager.AddCustomer(000015, "Lovisa Carlsson", "1993-05-06", "Stenbäcksvägen 24", 0, null, false); var guardian3 = customerManager.AddCustomer(000016, "Fredrik Malmberg", "1982-02-16", "Bergslagsgatan 11", 0, null, true); customerManager.AddCustomer(000017, "Emil Malmberg", "2011-04-17", "Bergslagsgatan 11", 0, guardian3, false); customerManager.AddCustomer(000018, "Birgitta Lindén", "1965-08-22", "Hellmansgatan 26", 0, null, false); customerManager.AddCustomer(000019, "Anders Lindén", "1963-09-28", "Hellmansgatan 26", 0, null, false); customerManager.AddCustomer(000020, "Maja Svensson", "1996-10-24", "Kamomillvägen 13", 0, null, false); Console.WriteLine("Klart"); Console.ReadLine(); }
static void Main(string[] args) { IPathManager pathManager = new PathManager(); pathManager.AddPath(1); pathManager.AddPath(2); pathManager.AddPath(3); IShelfManager shelfManager = new ShelfManager(); var shelf1 = shelfManager.AddShelf(1, 1); var shelf2 = shelfManager.AddShelf(2, 1); var shelf3 = shelfManager.AddShelf(3, 1); var shelf4 = shelfManager.AddShelf(1, 2); var shelf5 = shelfManager.AddShelf(2, 2); var shelf6 = shelfManager.AddShelf(3, 2); var shelf7 = shelfManager.AddShelf(1, 3); var shelf8 = shelfManager.AddShelf(2, 3); var shelf9 = shelfManager.AddShelf(3, 3); IBookManager bookManager = new BookManager(); bookManager.AddBook("Boken om Blå fåglar", "Bo Fink", "9789178130948", 2001, 1, 995, 1, false, 1, 1); bookManager.AddBook("Boken om Röda fåglar", "Bo Fink", " 9789113086972", 2002, 2, 25, 2, false, 1, 1); bookManager.AddBook("Boken om Gröna bilar", "Bosse Bildoktorn", "9780777772348", 2003, 2, 33, 3, false, 2, 1); bookManager.AddBook("Boken om Lila bilar", "Bosse Bildoktorn", "7891742479472", 2004, 2, 56, 4, false, 2, 1); bookManager.AddBook("Boken om Gråa blommor", "Ernst", "9789174247220", 2005, 2, 65, 5, false, 3, 2); bookManager.AddBook("Boken om Rosa blommor", "Ernst", "9789174249613", 2006, 3, 70, 6, false, 3, 2); bookManager.AddBook("Boken om gröna buskar", "Laila", "9789174249958", 2007, 5, 88, 7, false, 1, 2); bookManager.AddBook("Boken om Turkosa buskar", "Laila", "9789129710687", 2008, 3, 45, 8, false, 1, 2); bookManager.AddBook("Boken om Små hundar", "Kalle", "9789127155589", 2009, 1, 860, 9, false, 2, 3); bookManager.AddBook("Boken om Stora hundar", "Kalle", "9789127164345", 2010, 2, 56, 10, false, 2, 3); bookManager.AddBook("Boken om Tjocka katter", "Ullis", "9789127155282", 2011, 3, 2500, 11, false, 3, 4); bookManager.AddBook("Boken om lagom-stora katter", "Ullis", "9789174235616", 2012, 4, 95, 12, false, 3, 3); bookManager.AddBook("Boken om fula fiskar", "Anna", "9789172096738", 2013, 2, 190, 13, false, 1, 3); bookManager.AddBook("Boken om fina fiskar", "Anna", "9789178033553", 2014, 4, 220, 14, false, 1, 3); bookManager.AddBook("Boken om snälla människor", "Lotta", "9789129714036", 2015, 5, 330, 15, false, 2, 3); bookManager.AddBook("Boken om dumma människor ", "Lotta", "9789129716689", 2016, 2, 480, 16, false, 2, 3); bookManager.AddBook("Boken om tårtor", "Gunni", "9789129706406", 2017, 1, 510, 17, false, 3, 3); bookManager.AddBook("Boken om kakor", "Gunni", "9789127154377", 2018, 3, 80, 18, false, 3, 3); ICustomerManager customerManager = new CustomerManager(); customerManager.AddCustomer("Anna Karlsson", "SvansGatan 5", "1995-04-17", 0, false); customerManager.AddCustomer("Anders Svensson", "FågelGatan 6", "1980-04-15", 20, false); customerManager.AddCustomer("Mimmi Andersson", "TårtVägen 7", "1970-06-22", 3, false); customerManager.AddCustomer("Kenny Kvist", "VolvoVägen 8", "2001-07-13", 0, false); IMinorCustomerManager minorCustomerManager = new MinorCustomerManager(); minorCustomerManager.AddMinorCustomer("Klara Karlsson", "SvansGatan 5", "2010-06-03", 0, 1); minorCustomerManager.AddMinorCustomer("Max Karlsson", "SvansGatab 5", "2009-06-01", 0, 1); minorCustomerManager.AddMinorCustomer("Håkan Bråkan", "TårtVägen 7", "2007-03-13", 20, 4); /*ILoanManager loanManager = new LoanManager(); * loanManager.AddLoan(1, 1,loanStart,l); * loanManager.AddLoan(2, 2);*/ /*IMinorCustomerLoanManager minorCustomerLoanManager = new MinorCustomerLoanManager(); * minorCustomerLoanManager.AddMinorCustomerLoan(1, 3); * minorCustomerLoanManager.AddMinorCustomerLoan(2, 4);*/ }