/* House Rule */ public void CreateHouseRule(DateTime currentDate, string newRule) { houseRule = new HouseRule(currentDate, newRule); // Add rule to list AddHouseRuleToList(houseRule); }
// Test data private void GenerateTestDate() { // Admins Admin admin1, admin2, admin3; admin1 = new Admin("Rawan", "*****@*****.**", "12345"); admin2 = new Admin("Baian", "*****@*****.**", "12345"); admin3 = new Admin("Femke", "*****@*****.**", "12345"); AddAdminToList(admin1); AddAdminToList(admin2); AddAdminToList(admin3); //Students Student student1, student2, student3, student4, student5, student6, student7; student1 = new Student("Omar", "*****@*****.**", "12345", 1, 1); student2 = new Student("Mark", "*****@*****.**", "12345", 1, 4); student3 = new Student("Miley", "*****@*****.**", "12345", 1, 3); student4 = new Student("Pieter", "*****@*****.**", "12345", 1, 2); student5 = new Student("Kelvin", "*****@*****.**", "12345", 1, 5); student6 = new Student("Ranim", "*****@*****.**", "12345", 1, 6); student7 = new Student("Robin", "*****@*****.**", "12345", 1, 7); AddStudentToList(student1); AddStudentToList(student2); AddStudentToList(student3); AddStudentToList(student4); AddStudentToList(student5); AddStudentToList(student6); AddStudentToList(student7); student1.UpdateScore(15); student2.UpdateScore(38); student3.UpdateScore(2); student4.UpdateScore(63); student5.UpdateScore(5); student6.UpdateScore(12); student7.UpdateScore(24); // Random DateTime values DateTime four_jan = new DateTime(2020, 01, 04); DateTime six_jan = new DateTime(2020, 01, 06); DateTime seven_jan = new DateTime(2020, 01, 07); DateTime ten_jan = new DateTime(2020, 01, 10); DateTime thirteen_jan = new DateTime(2020, 01, 13); DateTime twinty_jan = new DateTime(2020, 01, 20); //Messages Message message1, message2, message3, message4, message5, message6, message7, message8, message9, message10; message1 = new Message(four_jan, MessageSubject.Question, "How can I make changes to my tenancy agreement?", 3); message2 = new Message(six_jan, MessageSubject.Complaint, "The elevator does not work, when will it be repaired?", 5); message3 = new Message(six_jan, MessageSubject.Complaint, "People are not cleaning the shared facilities", 3); message4 = new Message(seven_jan, MessageSubject.Question, "Why has my rent increased?", 5); message5 = new Message(ten_jan, MessageSubject.Complaint, "My neighbors are organizing parties during the week very late at night", 2); message6 = new Message(ten_jan, MessageSubject.Question, "How can I speak to my housing officer?", 7); message7 = new Message(thirteen_jan, MessageSubject.Question, "Am I due to have my kitchen and bathroom upgraded?", 7); message8 = new Message(thirteen_jan, MessageSubject.Question, "How can I report a repair?", 5); message9 = new Message(thirteen_jan, MessageSubject.Question, "Hello, I'm pieter and I'm moving to a new apartment, could you please remove my account?", 6); message10 = new Message(twinty_jan, MessageSubject.Complaint, "Mark didn't complete his task(Cleaning) on the 15th of january", 6); AddMessageToList(message1); AddMessageToList(message2); AddMessageToList(message3); AddMessageToList(message4); AddMessageToList(message5); AddMessageToList(message6); AddMessageToList(message7); AddMessageToList(message8); AddMessageToList(message9); AddMessageToList(message10); // agreements Agreement agreement1, agreement2, agreement3, agreement4, agreement5, agreement6; agreement1 = new Agreement(four_jan, "Mark & Pieter", "Can I use your hairgel?", "Accepted"); agreement2 = new Agreement(six_jan, "Mark & Everyone", "Please don't wear shoes inside.", "Pending", 1, 4, "->OmarMileyRobinRanim"); agreement3 = new Agreement(seven_jan, "Miley & Mark", "Please take away your towel and clothes after showering.", "Pending"); agreement4 = new Agreement(seven_jan, "Mark & Everyone", "Saturday is pizza day!", "Pending", 5, 6, "->OmarMileyKelvinRobinRanimMark"); agreement5 = new Agreement(ten_jan, "Omar & Everyone", "No loud noises after 11:00PM.", "Pending", 3, 5, "->OmarMileyPieterRobinRanim"); agreement6 = new Agreement(thirteen_jan, "Pieter & Mark", "Help me with unpacking the groceries.", "Pending"); AddAgreementToList(agreement1); AddAgreementToList(agreement2); AddAgreementToList(agreement3); AddAgreementToList(agreement4); AddAgreementToList(agreement5); AddAgreementToList(agreement6); // groceries GroceryItem item1, item2, item3, item4, item5, item6; item1 = new GroceryItem(1, "Olive oil", "Mark"); item2 = new GroceryItem(8, "Toilet paper", "Robin"); item3 = new GroceryItem(1, "Detergent", "Miley"); item4 = new GroceryItem(1, "Chili sauce", "Ranim"); item5 = new GroceryItem(3, "Wash powder", "Mark"); item6 = new GroceryItem(4, "Handsoap", "Kelvin"); AddGroceryItemToList(item1); AddGroceryItemToList(item2); AddGroceryItemToList(item3); AddGroceryItemToList(item4); AddGroceryItemToList(item5); AddGroceryItemToList(item6); // grocery history list GroceryHistory history1, history2, history3; history1 = new GroceryHistory(four_jan, "Mark", "1x Detergent (Robin).\n3x Air freshener (Miley).\n2xFabric softener (Robin)."); history2 = new GroceryHistory(seven_jan, "Robin", "2x Soap (Mark).\n1x Rubbing alcohol (Ranim)."); history3 = new GroceryHistory(ten_jan, "Omar", "4x Sponge (Kelvin).\n2x Toilet cleaner (Mark).\n1x Toilet brush (Mark)."); AddGroceryHistoryToList(history1); AddGroceryHistoryToList(history2); AddGroceryHistoryToList(history3); // House rules HouseRule rule1, rule2, rule3, rule4, rule5, rule6, rule7, rule8, rule9; rule1 = new HouseRule(four_jan, "No Smoking"); //rule2 = new HouseRule(four_jan, "No animals permitted in residence"); rule3 = new HouseRule(four_jan, "Keep the rooms clean"); //rule4 = new HouseRule(four_jan, "No fan heaters allowed whatsoever - these can very easily cause fires!"); rule4 = new HouseRule(four_jan, "No fan heaters allowed whatsoever"); rule5 = new HouseRule(four_jan, "Please use any off-street parking provided fairly between all housemates."); rule6 = new HouseRule(seven_jan, "The supplied furniture may not be removed from your room or the common areas."); rule7 = new HouseRule(seven_jan, "Please ensure that all air conditions/heating units are turned off in bedrooms before leaving the house."); rule8 = new HouseRule(seven_jan, "Guests must not interfere with the reasonable peace, comfort and privacy of other residents."); rule9 = new HouseRule(thirteen_jan, "Report your disturbances to your Resident Assistant and Building Manager"); AddHouseRuleToList(rule1); //AddHouseRuleToList(rule2); AddHouseRuleToList(rule3); AddHouseRuleToList(rule4); AddHouseRuleToList(rule5); AddHouseRuleToList(rule6); AddHouseRuleToList(rule7); AddHouseRuleToList(rule8); AddHouseRuleToList(rule9); DateTime eighteen_jan = new DateTime(2020, 01, 18); DateTime twentysecond_jan = new DateTime(2020, 01, 22); DateTime twentyeight_jan = new DateTime(2020, 01, 28); DateTime second_feb = new DateTime(2020, 02, 02); // Events CreateEvent(6, "My birthday party", "Floor 3 common area", eighteen_jan); VoteEvent(1, 3, PollType.Yes); VoteEvent(1, 4, PollType.Yes); VoteEvent(1, 5, PollType.No); VoteEvent(1, 1, PollType.No); CreateEvent(4, "Hang out", "First floor room 20", twentysecond_jan); //CreateEvent(3, "My birthday party", "Floor 3 common area", eighteen_jan); //CreateEvent(3, "My birthday party", "Floor 3 common area", eighteen_jan); }
private void AddHouseRuleToList(HouseRule rule) { houseRules.Add(rule); }