internal static void CleanRoom(RoomForTwo room) { string[] features = room.Features.Split(','); foreach (var item in features) { Console.WriteLine(item + " is clean"); } room.IsClean = true; }
internal void CleanRoom(RoomForTwo roomForTwo) { // we cant set directly isClean parameters therefore we use isClean function that change //the value of the parameter. the if check that the room clean. if (!roomForTwo.isClean()) { roomForTwo.isClean(); } Console.WriteLine($"{roomForTwo.GetFeatures()} is clean now"); }
public static void SetRooms() { for (int i = 0; i < numberOfRooms; i++) { if (i < 33) { rooms[i] = new RoomForTwo(i, 50); } else if (i < 66) { rooms[i] = new FamilyRoom(i, 50); } else { rooms[i] = new Suite(i, 50); } } }
static Reception() { rooms = new Room[NUMBER_OF_ROOMS]; for (int i = 0; i < NUMBER_OF_ROOMS - 1; i++) { if (i % 3 == 0) { rooms[i] = new RoomForTwo(i, 100); } else if (i % 2 == 0) { rooms[i] = new FamilyRoom(i, 100); } else { rooms[i] = new Suite(i, 100); } } }
public static Room CheckIn(Guest guest) { Random gen = new Random(); //frist tine we check in we need to create rooms element if (rooms[0] == null) { for (int i = 0; i < rooms.Length; i++) { Room room = null; int type = gen.Next(0, 3); switch (type) { case 0: room = new Suite(i, null, true); break; case 1: room = new FamilyRoom(i, null, true); break; case 2: room = new RoomForTwo(i, null, true); break; } rooms[i] = room; } } int room_num; do { room_num = gen.Next(0, NUMBER_OF_ROOM); }while (rooms[room_num].GetGuest() != null); rooms[room_num].SetGuest(guest); numberOfGuests++; return(rooms[room_num]); }
internal void CleanRoom(RoomForTwo RFT) { RFT.SetIsClean(true); Console.WriteLine("the bed, sink and bathroom have been cleaned"); }
private static void SendRoomService(RoomForTwo room) { roomService.CleanRoom(room); }
internal void CleanRoom(RoomForTwo roomForTwo) { roomForTwo.SetIsClean(true); Console.WriteLine($"{roomForTwo.GetFeatures()} have been cleaned"); }
internal void CleanRoom(RoomForTwo roomForTwo) { roomForTwo.SetClean(true); Console.WriteLine(roomForTwo.GetFeatures() + " were cleaned"); }
internal void CleanRoom(RoomForTwo room) { room.SetIsClean = true; Console.WriteLine($"{room.GetFeatures()} was cleaned!!"); }