forked from loopccoew/Buffer-4.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHouseRentalManagementSystem.txt.txt
862 lines (719 loc) · 38.1 KB
/
HouseRentalManagementSystem.txt.txt
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
package Buffer;
import java.util.*;
public class Main {
public static Scanner scanner = new Scanner(System.in);
private static HashMap<String, Owner> owners=new HashMap<String, Owner>();
private static HashMap<String, Tenant> tenants= new HashMap<String, Tenant>();
private static Graph graph=new Graph();
static BookingRequest check;
public static void main(String[] args) {
boolean isRunning = true;
while (isRunning) {
System.out.println("************************************");
System.out.println("=== House Rent Management System ===");
System.out.println("************************************");
System.out.println("1. Owner Login");
System.out.println("2. Tenant Login");
System.out.println("3. Create Owner Account");
System.out.println("4. Create Tenant Account");
System.out.println("5. Exit");
System.out.println("------------------------------------");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
scanner.nextLine();
System.out.println("------------------------------------");
switch (choice) {
case 1:
System.out.println("Enter your username: ");
String username=scanner.nextLine();
System.out.println("Enter your password: ");
String password=scanner.nextLine();
while(password.length()<6||password.length()>6) {
System.out.println("Please enter a 6 figure password.");
password=scanner.next();
}
String type="owner";
User obj1=login(username, password,type);
break;
case 2:
System.out.println("Enter your username: ");
String username1=scanner.nextLine();
System.out.println("Enter your password: ");
String password1=scanner.nextLine();
while(password1.length()<6||password1.length()>6) {
System.out.println("Please enter a 6 figure password.");
password1=scanner.next();
}
String type1="tenant";
User obj2=login(username1, password1,type1);
break;
case 3:
System.out.println("Enter your username: ");
String username2=scanner.nextLine();
System.out.println("Enter your password: ");
String password2=scanner.nextLine();
while(password2.length()<6||password2.length()>6) {
System.out.println("Please enter a 6 figure password.");
password2=scanner.next();
}
System.out.println("Enter your phone Number: ");
String phoneNumber2=scanner.next();
while(phoneNumber2.length()<10||phoneNumber2.length()>10) {
System.out.println("Invalid phone number! Please enter a valid phone number.");
phoneNumber2=scanner.next();
}
createOwnerAccount(username2, password2, phoneNumber2);
break;
case 4:
System.out.println("Enter your username: ");
String username3=scanner.nextLine();
System.out.println("Enter your password: ");
String password3=scanner.nextLine();
while(password3.length()<6||password3.length()>6) {
System.out.println("Please enter a 6 figure password.");
password3=scanner.next();
}
System.out.println("Enter your phone Number: ");
String phoneNumber3=scanner.next();
while(phoneNumber3.length()<10||phoneNumber3.length()>10) {
System.out.println("Invalid phone number! Please enter a valid phone number.");
phoneNumber3=scanner.next();
}
createTenantAccount(username3, password3, phoneNumber3);
break;
case 5:
System.out.println("************");
System.out.println("Thankyou!!!!");
System.out.println("************");
isRunning = false;
break;
default:
System.out.println("Invalid choice. Please try again.");
break;
}
}
}
public static User login(String username, String password, String type) {
if (type.equals("owner")) {
Owner owner = owners.get(username);
if(owner==null){
System.out.println("Account with this username does not exist.");
}
else if (owner != null && owner.getPassword().equals(password)) {
owneroptions(owner);
return owner;
}else {
System.out.println("Invalid username or password.");
}
}
else if (type.equals("tenant")) {
Tenant tenant = tenants.get(username);
if(tenant==null){
System.out.println("Account with this username does not exist.");
}
else if (tenant != null && tenant.getPassword().equals(password)) {
tenantoptions(tenant);
return tenant;
}else {
System.out.println("Invalid username or password.");
}
}
return null;
}
public static void createOwnerAccount(String username, String password, String phoneNumber) {
Owner owner = new Owner(username, password, phoneNumber);
owners.put(username, owner);
owneroptions(owner);
}
public static void createTenantAccount(String username, String password, String phoneNumber) {
Tenant tenant = new Tenant(username, password, phoneNumber);
tenants.put(username, tenant);
tenantoptions(tenant);
}
static void owneroptions(User owner) {
System.out.println();
System.out.println("*********************");
System.out.println("=== Owner Options ===");
System.out.println("*********************");
boolean isLoggedIn = true;
while (isLoggedIn) {
System.out.println("------------------------------------");
System.out.println("1. Add Property");
System.out.println("2. Update Property");
System.out.println("3. view booking requests");
System.out.println("4. View your property details");
System.out.println("5. Logout");
System.out.println("------------------------------------");
System.out.print("Enter your choice: ");
int choice = scanner.nextInt();
scanner.nextLine();
System.out.println("------------------------------------");
switch (choice) {
case 1:
System.out.println("Enter owner name: ");
String name=scanner.nextLine();
System.out.println("Enter size of the property in square meter: ");
int size=scanner.nextInt();
System.out.println("Enter price of the property: ");
int price=scanner.nextInt();
System.out.println("Enter amenities of the property: ");
String amenities=scanner.next();
System.out.println("Enter availability of the property true or false: ");
boolean available=scanner.nextBoolean();
System.out.println("Enter area of the property: ");
String areaLabel=scanner.next();
addProperty(owner.getUsername(),name, size, price,amenities,owner.getPhoneNumber(),available,areaLabel);
break;
case 2:
System.out.println("Enter your propertyid: ");
int id1=scanner.nextInt();
updateProperty(owner.getUsername(),id1);
break;
case 3:
System.out.println("Enter property id which you want to check: ");
int propertyId1=scanner.nextInt();
check=acceptBookingRequest(owner.getProperties(),propertyId1);
break;
case 4:
System.out.println("Enter your propertyid: ");
int id2=scanner.nextInt();
viewProperties(owner.getUsername(),id2);
break;
case 5:
System.out.println("----------------------");
System.out.println("You have logged out!!!");
System.out.println("----------------------");
isLoggedIn = false;
break;
default:
System.out.println("Invalid choice. Please try again.");
break;
}
}
}
static void tenantoptions(User tenant) {
System.out.println();
System.out.println("**********************");
System.out.println("=== Tenant Options ===");
System.out.println("**********************");
boolean isLoggedIn = true;
while (isLoggedIn) {
System.out.println("------------------------------------");
System.out.println("1. View Properties in your interested area");
System.out.println("2. Send Booking Request");
System.out.println("3. View Status of Booked Properties");
System.out.println("4. Logout");
System.out.println("------------------------------------");
System.out.print("Enter your choice: ");
int choice1 =scanner.nextInt();
System.out.println("------------------------------------");
switch (choice1) {
case 1:
System.out.println("Enter your interesed area: ");
String searcharea=scanner.next();
System.out.println();
System.out.println("Area: "+searcharea);
System.out.println("==============================");
Graph.searchprop(searcharea);
System.out.println();
break;
case 2:
System.out.println("Enter property id which you want to book: ");
int propertyId=scanner.nextInt();
System.out.println("Enter name of tenant: ");
String tenantName=scanner.next();
System.out.println("Enter contact number of tenant: ");
String tenantContact=scanner.next();
while(tenantContact.length()<10||tenantContact.length()>10) {
System.out.println("Invalid phone number! Please enter a valid phone number.");
tenantContact=scanner.next();
}
sendBookingRequest(tenant.getProperties(), propertyId, tenantName,tenantContact);
break;
case 3:
System.out.println("Enter property id to check status: ");
int propertyId1=scanner.nextInt();
seeStatus(check,tenant.getProperties(),propertyId1);
break;
case 4:
System.out.println("----------------------");
System.out.println("You have logged out!!!");
System.out.println("----------------------");
isLoggedIn = false;
break;
default:
System.out.println("Invalid choice. Please try again.");
break;
}
}
}
public static void addProperty(String username, String name, int size, int price, String amenities, String phoneNumber, boolean available, String areaLabel) {
User owner = owners.get(username);
if (owner == null) {
return;
}
SpecialNode area = null;
for (SpecialNode node : graph.getSpecialNodes()) {
if (node.getLabel().equals(areaLabel)) {
area = node;
break;
}
}
if (area == null) {
area = new SpecialNode(areaLabel);
graph.addSpecialNode(area);
}
PropertyNode property = new PropertyNode(graph.getPropertyNodes().size() + 1, name, size, price, amenities, phoneNumber, available, area);
graph.addPropertyNode(property);
owner.addProperty(property);
System.out.println("================================");
System.out.println("Property added successfully!!!!!");
System.out.println("Id of your property is: " + property.getId());
System.out.println("================================");
}
public static void updateProperty(String username,int propid){
User owner = owners.get(username);
if (owner == null) {
return;
}
for (PropertyNode node : graph.getPropertyNodes()) {
if (node.getId()==propid ) {
System.out.println("-----------------------");
System.out.println("Your Property details: ");
System.out.println("-----------------------");
System.out.println("Size of your Property is: "+node.getSize());
System.out.println("Price of your Property is: "+node.getPrice());
System.out.println("Amenities of your Property is: "+node.getAmenities());
System.out.println("Availability of your Property is: "+node.isAvailable());
System.out.println("---------------------------------------------");
boolean flag=true;
while(flag==true) {
System.out.println("----------------------");
System.out.println("1. update size");
System.out.println("2. update price");
System.out.println("3. update amenities");
System.out.println("4. update availaibility status of property");
System.out.println("5. update owner phoneno");
System.out.println("6. exit");
System.out.println("----------------------");
System.out.print("Enter your choice: ");
int choice1 =scanner.nextInt();
System.out.println("----------------------");
switch (choice1) {
case 1:
System.out.println("Enter updated size: ");
int upsize=scanner.nextInt();
node.setSize(upsize);
break;
case 2:
System.out.println("Enter updated price: ");
int upprice=scanner.nextInt();
node.setPrice(upprice);
break;
case 3:
System.out.println("Enter updated amenities: ");
String upamenities=scanner.next();
node.setAmenities(upamenities);
break;
case 4:
System.out.println("Enter updated status of property: ");
boolean upstatus=scanner.nextBoolean();
node.setAvailable(upstatus);
break;
case 5:
System.out.println("Enter updated phoneno: ");
String upphoneno=scanner.next();
node.setPhoneNumber(upphoneno);
break;
case 6:
System.out.println("All required details are updated. ");
System.out.println("----------------------------------");
flag = false;
return;
default:
System.out.println("Invalid choice. Please try again.");
break;
}
}
break;
}
}
System.out.println("Property not found.");
return;
}
public static void viewProperties(String username,int ID) {
Owner owner = owners.get(username);
if (owner == null) {
return;
}
for (PropertyNode node : graph.getPropertyNodes()) {
if (node.getId()==ID ) {
System.out.println("-----------------------");
System.out.println("Your Property details: ");
System.out.println("-----------------------");
System.out.println("Size of your Property is: "+node.getSize());
System.out.println("Price of your Property is: "+node.getPrice());
System.out.println("Amenities of your Property is: "+node.getAmenities());
System.out.println("Availability of your Property is: "+node.isAvailable());
System.out.println("---------------------------------------------");
break;
}
else {
System.out.println("Property not found");
}
}
}
public static void sendBookingRequest(ArrayList<PropertyNode> properties, int propertyId, String tenantName, String tenantContact) {
boolean propertyFound = false;
for (PropertyNode property : graph.getPropertyNodes()) {;
if (property.getId()==propertyId) {
propertyFound = true;
if (property.isAvailable()) {
property.addBookingRequest(new BookingRequest(tenantName, tenantContact,propertyId));
System.out.println();
System.out.println("Booking request sent to property owner for Property ID: " + propertyId);
System.out.println();
} else {
System.out.println();
System.out.println("Property with ID " + propertyId + " is already booked.");
System.out.println();
}
break;
}
}
if (!propertyFound) {
System.out.println("Property with ID " + propertyId + " not found.");
}
}
public static BookingRequest acceptBookingRequest(ArrayList<PropertyNode> properties, int propertyId) {
PropertyNode property = null;
for (PropertyNode p : graph.getPropertyNodes()) {
if (p.getId() == propertyId) {
property = p;
break;
}
}
if (property == null) {
System.out.println("Property not found.");
return null;
}
BookingRequest bookingRequest = property.getBookingRequestQueue().poll();
if (bookingRequest == null) {
System.out.println("No booking requests found for property with ID " + propertyId+". ");
return null;
}
System.out.println("------------------------");
System.out.println("The tenant details are: ");
System.out.println("------------------------");
System.out.println("Name of tenant: "+bookingRequest.getTenantName());
System.out.println("Contact of tenant: "+bookingRequest.getTenantContact());
System.out.println("-----------------------------------");
System.out.println("Do you want to accept this request? (Press 1 to accept or 2 to reject)");
int ch=scanner.nextInt();
System.out.println("------------------------");
switch(ch) {
case 1:
bookingRequest.setStatus("Accepted");
property.setAvailable(false);
System.out.println("Booking request accepted for "+bookingRequest.getTenantName()+" for Property ID: " + propertyId+". ");
break;
case 2:
bookingRequest.setStatus("Rejected");
property.setAvailable(true);
System.out.println("Booking request rejected for "+bookingRequest.getTenantName()+" for Property ID: " + propertyId+". ");
break;
default :
System.out.println("Invalid choice! Enter vaild choice.");
break;
}
return bookingRequest;
}
public static void seeStatus(BookingRequest check, ArrayList<PropertyNode> properties,int propertyId) {
PropertyNode property = null;
for (PropertyNode p : graph.getPropertyNodes()) {
if (p.getId() == propertyId) {
property = p;
break;
}
}
if(property.isAvailable()==true&&check==null) {
System.out.println("--------------------------------------------------------------");
System.out.println("Your booking request for property "+property.getId()+" is in queue" );
System.out.println("--------------------------------------------------------------");
}
else if(property.isAvailable()==false&&check.getStatus()=="Accepted") {
System.out.println("--------------------------------------------------------------");
System.out.println("Your booking request for property "+property.getId()+" is Accepted" );
System.out.println("--------------------------------------------------------------");
}
else {
System.out.println("--------------------------------------------------------------");
System.out.println("Your booking request for property "+property.getId()+" is Rejected" );
System.out.println("--------------------------------------------------------------");
}
System.out.println();
}
}
package Buffer;
import java.util.*;
public class User {
private String username;
private String password;
private String phoneNumber;
private ArrayList<PropertyNode> properties;
public User(String username, String password,String phoneNumber) {
this.username = username;
this.password = password;
this.phoneNumber=phoneNumber;
this.properties = new ArrayList<PropertyNode>();
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public String getPhoneNumber() {
return phoneNumber;
}
public ArrayList<PropertyNode> getProperties() {
return properties;
}
public void addProperty(PropertyNode property) {
properties.add(property);
}
}
class Owner extends User {
public Owner(String username, String password, String phoneNumber) {
super(username, password, phoneNumber);
}
}
class Tenant extends User {
public Tenant(String username, String password, String phoneNumber) {
super(username, password,phoneNumber);
}
}
package Buffer;
public class SpecialNode {
private String label;
public SpecialNode(String label) {
this.label = label;
}
public String getLabel() {
return label;
}
}
package Buffer;
import java.util.*;
public class PropertyNode {
private int id;
private String name;
private int size;
private int price;
private String amenities;
private String phoneNumber;
private boolean available;
private SpecialNode area;
private ArrayList<PropertyNode> neighbors;
private Queue<BookingRequest> bookingRequestQueue;
public PropertyNode(int id, String name, int size, int price, String amenities, String phoneNumber, boolean available, SpecialNode area) {
this.id = id;
this.name = name;
this.size = size;
this.price = price;
this.amenities = amenities;
this.phoneNumber = phoneNumber;
this.available = available;
this.area = area;
this.neighbors = new ArrayList<PropertyNode>();
this.bookingRequestQueue = new LinkedList<>();
}
public int getId() {
return id;
}
public String getName() {
return name;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size=size;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price=price;
}
public String getAmenities() {
return amenities;
}
public void setAmenities(String amenities ) {
this.amenities=amenities;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber ) {
this.phoneNumber=phoneNumber;
}
public boolean isAvailable() {
return available;
}
public void setAvailable(boolean available) {
this.available = available;
}
public SpecialNode getArea() {
return area;
}
public ArrayList<PropertyNode> getNeighbors() {
return neighbors;
}
public void addNeighbor(PropertyNode neighbor) {
neighbors.add(neighbor);
}
public void removeNeighbor(PropertyNode neighbor) {
neighbors.remove(neighbor);
}
public void addBookingRequest(BookingRequest bookingRequest) {
this.bookingRequestQueue.offer(bookingRequest);
}
public Queue<BookingRequest> getBookingRequestQueue() {
return bookingRequestQueue;
}
public Queue<BookingRequest> getBookings() {
Queue<BookingRequest> bookings = new LinkedList<>();
for (BookingRequest bookingRequest : bookingRequestQueue) {
if (bookingRequest.getProperty().isAvailable() && !bookings.contains(bookingRequest)) {
bookings.offer(bookingRequest);
}
}
return bookings;
}
}
package Buffer;
import java.util.*;
public class Graph {
private static ArrayList<SpecialNode> specialNodes;
private static ArrayList<PropertyNode> propertyNodes;
public Graph() {
this.specialNodes = new ArrayList<SpecialNode>();
this.propertyNodes = new ArrayList<PropertyNode>();
}
public void addSpecialNode(SpecialNode node) {
specialNodes.add(node);
}
public void addPropertyNode(PropertyNode node) {
propertyNodes.add(node);
}
public ArrayList<SpecialNode> getSpecialNodes() {
return specialNodes;
}
public ArrayList<PropertyNode> getPropertyNodes() {
return propertyNodes;
}
public static void createAdjacencyList(SpecialNode searcharea) {
ArrayList<PropertyNode> neighbors = new ArrayList<PropertyNode>();
for (PropertyNode node : propertyNodes) {
if(node.getArea().equals(searcharea)) {
neighbors.add(node);
for (PropertyNode otherNode : propertyNodes) {
if (node != otherNode && node.getArea() == otherNode.getArea()) {
neighbors.add(otherNode);
}
}
break;
}
}
System.out.println("--------------------------------------------------------------");
System.out.println("Available properties in " +searcharea.getLabel() + ":");
System.out.println("--------------------------------------------------------------");
for (PropertyNode neighbor : neighbors) {
if(neighbor.isAvailable()==true) {
System.out.println(" |");
System.out.println(" |");
System.out.println(" |");
System.out.println("--------------------------------------------------------------");
System.out.println(" |Name of the owner is: |" +neighbor.getName());
System.out.println(" |The amenities avaliable are: |" +neighbor.getAmenities());
System.out.println(" |Price of the property is: |" +neighbor.getPrice());
System.out.println(" |Size of the given property is: |" +neighbor.getSize());
System.out.println(" |Contact number of the owner is: |" +neighbor.getPhoneNumber());
System.out.println(" |The property ID is: |" +neighbor.getId());
System.out.println("--------------------------------------------------------------");
}
}
}
public static void searchprop(String area) {
SpecialNode searcharea = null;
for (SpecialNode node : specialNodes) {
if (node.getLabel().equals(area)) {
searcharea = node;
createAdjacencyList(searcharea);
return;
}
}
System.out.println("Area not found.");
return;
}
}
package Buffer;
import java.util.*;
public class BookingRequest {
private String tenantName;
private String tenantContact;
private int propertyId;
private PropertyNode property;
private String status;
public BookingRequest(String tenantName, String tenantContact, int propertyId) {
this.tenantName = tenantName;
this.tenantContact = tenantContact;
this.propertyId = propertyId;
this.status=null;
}
public String getTenantName() {
return tenantName;
}
public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}
public String getTenantContact() {
return tenantContact;
}
public void setTenantContact(String tenantContact) {
this.tenantContact = tenantContact;
}
public int getPropertyId() {
return propertyId;
}
public void setPropertyId(int propertyId) {
this.propertyId = propertyId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status=status;
}
public PropertyNode getProperty() {
return property;
}
public void setProperty(PropertyNode property) {
this.property = property;
}
public void getProperty(ArrayList<PropertyNode> properties) {
for (PropertyNode property : properties) {
if (property.getId()==this.propertyId) {
this.setProperty(property);
break;
}
}
}
public String getpropertyAddress() {
return null;
}
public int getpropertyPrice() {
return 0;
}
}