Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard
 
7bf57b2f0f2b3cf0ae9489a8204918762e64648e
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
package domain;

import java.io.Serializable;
import java.util.Vector;

@SuppressWarnings("serial")
public class Owner implements Serializable {

	private String bankAccount = "";
	private String name = "";
	private String mailAccount = "";
	private Vector<RuralHouse> ruralHouses;

//	public Owner(String name) {
//		this.name = name;
//		ruralHouses = new Vector<RuralHouse>();
//	}

	public Owner(String name, String bankAccount,String mail) {
		this.bankAccount = bankAccount;
		this.name = name;
		this.mailAccount = mail;
		ruralHouses = new Vector<RuralHouse>();
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBankAccount() {
		return this.bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	public Vector<RuralHouse> getRuralHouses(){
		return this.ruralHouses;
	}



	public RuralHouse addRuralHouse(String houseName, String description,
			String town, int nRooms, int nKitchens, int nBaths, int nLivings,
			int nParkings) {
		HouseFeatures feature = new HouseFeatures(nRooms, nKitchens, nBaths, nLivings, nParkings);
		RuralHouse rh = new RuralHouse(houseName, this, description, town,feature);
		ruralHouses.add(rh);
		return rh;
	}
	
	public RuralHouse addRuralHouse(RuralHouse rh) {
		ruralHouses.add(rh);
		return rh;
	}

	public String toString() {
		return name;
	}

	public String getMailAccount() {
		return mailAccount;
	}

	public void setMailAccount(String mailAccount) {
		this.mailAccount = mailAccount;
	}
	
	public Vector<Offer> getAllOffers (){
		Vector<Offer> offers = new Vector<Offer>();
		for(RuralHouse rh: this.ruralHouses){
			for(Offer of : rh.getAllOffers()){
			offers.add(of);
			}
		}
		return offers;
	}

}

Commits for RRRRHHHH_CoderuralHouses/src/domain/Owner.java

Diff revisions: vs.
Revision Author Commited Message
7bf57b ... Diff Diff camjan Sun 17 May, 2015 11:59:22 +0000

Possibility of registering new owners added

dd0098 ... Diff Diff pinene picture pinene Sun 19 Apr, 2015 15:23:19 +0000

database management

7c0734 ... Diff Diff Eneko Pinzolas Murua Tue 10 Mar, 2015 12:15:11 +0000

house code changed to name

a92725 ... Diff Diff pinene picture pinene Fri 06 Mar, 2015 09:41:12 +0000

implemented lacking GUIs and corrected errors

553879 ... Diff Diff camjan Wed 04 Mar, 2015 18:42:47 +0000

House Features added and logic for adding options to the owner

d23286 ... Diff Diff unknown Tue 03 Mar, 2015 22:07:56 +0000

The code for different owner operations mostly implemented

41f4d3 ... Diff Diff epinzolas001 Fri 27 Feb, 2015 12:55:15 +0000

Created Account class to separate identification from the Owner

e0d74d ... unknown Thu 26 Feb, 2015 19:24:02 +0000

Given code uploaded