This repository was archived by the owner on Dec 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIManagementSystem.java
More file actions
161 lines (144 loc) · 4.8 KB
/
Copy pathIManagementSystem.java
File metadata and controls
161 lines (144 loc) · 4.8 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// ___ ___ _ _ _ _____ ___ _ _ _ _ _ ___ ___ _ _ _
// | \ / _ \| \| ( )_ _| / __| || | /_\ | \| |/ __| __| | | |
// | |) | (_) | .` |/ | | | (__| __ |/ _ \| .` | (_ | _||_|_|_|
// |___/ \___/|_|\_| |_| \___|_||_/_/ \_\_|\_|\___|___(_|_|_)
public interface IManagementSystem {
/*
* Add a new house with given parameters - street where the house is located,
* number of bedrooms, number of bathrooms, price per month - to the management system
*
* @param street where the house is located
*
* @param bedrooms number of bedrooms
*
* @param bathrooms number of bathroom
*
* @param price price per month
*
* @return ID of the house
*/
public int addNewHouse(String street, int bedrooms, int bathrooms, int price);
/*
* Add a new apartment with given parameters - street where the apartment is located,
* number of bedrooms, number of bathrooms, price per month, indication whether
* there's a lift in the building, floor on which the apartment is,
* number of floors in the building - to the management system
*
* @param street where the house is located
*
* @param bedrooms number of bedrooms
*
* @param bathrooms number of bathrooms
*
* @param price price per month
*
* @param lift is there a lift in the building
*
* @param apartmentFloor floor on which is the apartment
*
* @param buildingFloors number of floors in the building
*
* @return ID of the apartment
*/
public int addNewApartment(String street, int bedrooms, int bathrooms, int price, boolean lift, int apartmentFloor, int buildingFloors);
/*
* Add a new client with given parameters - name, email address to the
* management system
*
* @param name name of the client
*
* @param emailAddress email address of the client
*
* @return ID of the client
*/
public int addRegularClient(String name, String emailAddress);
/*
* Add a new VIP client with given parameters - name, email address to the
* management system
*
* @param name name of the client
*
* @param emailAddress email address of the client
*
* @return ID of the VIP client
*/
public int addVIPClient(String name, String emailAddress);
/*
* Search for a place based on the price range. Print all the found properties.
*
* @param minPrice minimal price of a place (house or apartment)
*
* @param maxPrice maximal price of a place (house or apartment)
*/
public void searchOnPrice(int minPrice, int maxPrice);
/*
* Search for a place based on the minimum number of bedrooms and max price.
* Print all the found properties.
*
* @param minBedrooms minimum of bedrooms in the house or apartment
*
* @param maxPrice maximal price of a place (house or apartment)
*/
public void searchOnBedroomsAndPrice(int minBedrooms, int maxPrice);
/*
* Search for a place within a circle, given by center point and radius in kilometers.
* Print all the found properties.
*
* @param street is a center point for the search
*
* @param radius is radius in km for which the seach is applied
*/
public void searchOnDistance(String street, double radius);
/*
* Request a visit of selected property (house or apartment)
*
* @param client ID of a client who's requesting a visit
*
* @param property ID of a property to visit (house or apartment)
*/
public void requestVisit(int client, int property);
/*
* Organize visit for each property where 5 or more people requested a visit.
* Print the property details and all client names.
*
*/
public void organizeVisits();
/*
* Print all houses in the system. Print number of houses and a summary details
* about each one.
*/
public void printHouses();
/*
* Print all apartments in the system. Print number of apartments and a summary
* details about each one.
*/
public void printApartments();
/*
* Print all regular clients. Print number of clients and a summary details
* about each one.
*/
public void printRegularClients();
/*
* Print all VIP clients. Print number of VIP clients and a summary details
* about each one.
*/
public void printVIPClient();
/*
* Adds a street into the system
*
* @param streetName name of the street that is added to the system
*
*/
public void addStreet(String streetName);
/*
* Adds connection between streets into the system
*
* @param street1 name of the first street that is being connected
*
* @param street2 name of the second street that is being connected
*
* @param distance is the distance between the streets
*
*/
public void connectStreets(String street1, String street2, double distance);
}