-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProblem.java
60 lines (52 loc) · 1.36 KB
/
Problem.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.company;
import java.util.Arrays;
/**
* The Problem class prints for the client the instance of the problem, more precisely the rooms and the events.
*
* @author Stratan Corina
*/
public class Problem {
private Event[] events;
private Room[] rooms;
/**
* Explicit value constructor for Problem (<code>Event, Room </code>)
*
* @param events the array with Events
* @param rooms the array with Rooms.
*/
public Problem(Event[] events, Room[] rooms) {
this.events = events;
this.rooms = rooms;
}
/**
* @return the events
*/
public Event[] getEvents() {
return events;
}
/**
* @return the rooms
*/
public Room[] getRooms() {
return rooms;
}
/**
* Sets the array of Events that we will use
* @param events is an array with Events
*/
public void setEvents(Event[] events) {
events = events;
}
public void setRooms(Room[] rooms) {
rooms = rooms;
}
/**
* @return a string representation of the instance of the problem
*/
@Override
public String toString() {
return "Problem: " + "\n" +
"Events: " + Arrays.toString(events) + "; \n" +
"Rooms: " + Arrays.toString(rooms) + ".";
}
}