package com.ticktac.business;

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

public class User implements Serializable {
	private String name;
	private String surname;
	private String email;
	private String password;
	private Vector<Ticket> bought_tickets;
	private Vector<Event> events;
	
	
	public User() {}
	
	public User(String name, String surname, String email, String password) {
		this.name = name;
		this.surname = surname;
		this.email = email;
		this.password = password;
		this.bought_tickets= new Vector<Ticket>();
		this.events= new Vector<Event>();
	}
	
	public String getName() {
		return name;
	}
	
	public String getSurname() {
		return surname;
	}

	public String getEmail() {
		return email;
	}
	
	/*
	 * For the purpose of emulating the DB
	 */
	public String getPassword() {
		return password;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public void setSurname(String surname) {
		this.surname = surname;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	/*
	 * For the purpose of emulating the DB
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	public Vector<Ticket> getBought_tickets() {
		return bought_tickets;
	}

	public void setBought_tickets(Vector<Ticket> bought_tickets) {
		this.bought_tickets = bought_tickets;
	}

	public Vector<Event> getEvents() {
		return events;
	}

	public void setEvents(Vector<Event> events) {
		this.events = events;
	}
}

@@ -567,24 +567,38 @@
 nt%3E();%0A%09%7D%0A%09%0A
+%09// Getters%0A%09%0A
 %09public Stri
@@ -830,24 +830,169 @@
 password;%0A%09%7D
+%0A%0A%09public Vector%3CTicket%3E getBought_tickets() %7B%0A%09%09return bought_tickets;%0A%09%7D%0A%0A%09public Vector%3CEvent%3E getEvents() %7B%0A%09%09return events;%0A%09%7D%0A%09%0A%09// Setters
 %0A%09%0A%09public v
@@ -1308,82 +1308,9 @@
 %0A%09%7D%0A
-%0A%09public Vector%3CTicket%3E getBought_tickets() %7B%0A%09%09return bought_tickets;%0A%09%7D%0A
+%09
 %0A%09pu
@@ -1404,32 +1404,33 @@
 ught_tickets;%0A%09%7D
+%09
 %0A%0A%09public Vector
@@ -1415,32 +1415,47 @@
 s;%0A%09%7D%09%0A%0A%09public 
+void setEvents(
 Vector%3CEvent%3E ge
@@ -1452,38 +1452,41 @@
 %3CEvent%3E 
-getE
+e
 vents
-(
 ) %7B%0A%09%09
-return
+this.events =
  events;
@@ -1485,24 +1485,25 @@
  events;%0A%09%7D%0A
+%09
 %0A%09public voi
@@ -1508,64 +1508,126 @@
 oid 
-setEvents(Vector%3CEvent%3E
+addTicket(Ticket ticket) %7B%0A%09%09bought_tickets.add(ticket);%0A%09%7D%0A%09%0A%09public void addEvent(Event
  event
-s
 ) %7B%0A%09%09
-this.
 events
- = 
+.add(
 event
-s
+)
 ;%0A%09%7D

Add adding methods in User.