package data.trainnetwork;

import java.math.BigInteger;
import java.security.SecureRandom;

/**
 * A class representing a Seat within section
 * @author Balazs Pete
 *
 */
public class Seat {
	
	private String id;
	
	/**
	 * Create a new Seat
	 * @param id
	 */
	public Seat() {
		this.id = new BigInteger(130, new SecureRandom()).toString(32);
	}
	
	/**
	 * Get the ID of the Seat
	 * @return
	 */
	public String getId() {
		return id;
	}
	
	/**
	 * Compare another seat with this one
	 * @param seat The other seat to compare with
	 * @return True if the two seats are identical
	 */
	public boolean equals(Seat seat) {
		return id.equals(seat.getId());
	}
}
@@ -206,16 +206,34 @@
 tring id
+, sectionId = null
 ;%0A%09%0A%09/**
@@ -455,24 +455,395 @@
 ;%0A%09%7D%0A%09%0A%09/**%0A
+%09 * Add the corresponding %7B@link Section%7D (will be stored as an ID reference)%0A%09 * @param section The section the seat belongs to%0A%09 */%0A%09public void addSection(Section section) %7B%0A%09%09sectionId = section.getID();%0A%09%7D%0A%09%0A%09/**%0A%09 * Get the ID of the corresponding %7B@link Section%7D%0A%09 * @return The id of the section%0A%09 */%0A%09public String getSectionId() %7B%0A%09%09return sectionId;%0A%09%7D%0A%09%0A%09/**%0A
 %09 * Compare 

Add ability to associate a seat with a section