<<<<<<< HEAD
package com.example.command;

import java.util.ArrayList;

import com.example.business.Room;
import com.example.dao.RoomDao;
import com.example.dao.UserDao;
import com.example.exceptions.DaoException;
public class Controller {
	
	UserDao userdao = new UserDao();
	RoomDao roomdao = new RoomDao();
	
	public boolean login(String uName, String pWord){
		try {			
			System.out.println("Try login");
			userdao.login(uName, pWord);
			return true;
		} 
		catch (DaoException e) {
			System.out.println("fails login");
			e.printStackTrace();
			return false;
		}
	}//End login
	
	public boolean logout(){
		return true;
	}//End logout
	
	public boolean register(String regUsername, String regPassword, String regConfirmPassword, String registerEmail, String regDOB, String regContactNumber){
		try {			
			userdao.register(regUsername, regPassword, regConfirmPassword, registerEmail, regDOB, regContactNumber);
			return true;
		} 
		catch (DaoException e) {
			e.printStackTrace();
			return false;
		}
	}//End register
	
	public ArrayList<Room> getRoom(String type,boolean smoking, float priceMin,float priceMax, int noOfPeople)
	{
		try{
			System.out.println("Try Search");
			return roomdao.getRoom(type,smoking,priceMin,priceMax,noOfPeople);
		}
		catch(DaoException e)
		{
			System.out.println("Fail to search");
			e.printStackTrace();
			return null;
		}
	}
}
=======
package com.example.command;

import com.example.dao.UserDao;
import com.example.exceptions.DaoException;
public class Controller {
	
	UserDao userdao = new UserDao();
	
	
	public boolean login(String username, String password){
		try {			
			userdao.login(username, password);
			return true;
		} 
		catch (DaoException e) {
			e.printStackTrace();
			return false;
		}
	}//End login
	
	public boolean logout(){
		return true;
	}//End logout
	
	public boolean register(String regUsername, String regPassword, String regConfirmPassword, String registerEmail, String regDOB, String regContactNumber){
		try {			
			userdao.register(regUsername, regPassword, regConfirmPassword, registerEmail, regDOB, regContactNumber);
			return true;
		} 
		catch (DaoException e) {
			e.printStackTrace();
			return false;
		}
	}//End login
}
>>>>>>> branch 'master' of https://github.com/AndrewKLeech/GCTEAMC

@@ -1,17 +1,4 @@
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
 pack
@@ -27,103 +27,8 @@
 d;%0A%0A
-import java.util.ArrayList;%0A%0Aimport com.example.business.Room;%0Aimport com.example.dao.RoomDao;%0A
 impo
@@ -166,40 +166,8 @@
 );%0A%09
-RoomDao roomdao = new RoomDao();
 %0A%09%0A%09
@@ -195,17 +195,20 @@
 String u
-N
+sern
 ame, Str
@@ -212,17 +212,20 @@
 String p
-W
+assw
 ord)%7B%0A%09%09
@@ -237,44 +237,8 @@
 %09%09%09%0A
-%09%09%09System.out.println(%22Try login%22);%0A
 %09%09%09u
@@ -255,16 +255,22 @@
 in(u
-N
+sern
 ame, p
-W
+assw
 ord)
@@ -323,46 +323,8 @@
 ) %7B%0A
-%09%09%09System.out.println(%22fails login%22);%0A
 %09%09%09e
@@ -813,24 +813,21 @@
 %09%7D//End 
-register
+login
 %0A%09%0A%09publ
@@ -1172,907 +1172,4 @@
 %7D%0A%7D%0A
-=======%0Apackage com.example.command;%0A%0Aimport com.example.dao.UserDao;%0Aimport com.example.exceptions.DaoException;%0Apublic class Controller %7B%0A%09%0A%09UserDao userdao = new UserDao();%0A%09%0A%09%0A%09public boolean login(String username, String password)%7B%0A%09%09try %7B%09%09%09%0A%09%09%09userdao.login(username, password);%0A%09%09%09return true;%0A%09%09%7D %0A%09%09catch (DaoException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D//End login%0A%09%0A%09public boolean logout()%7B%0A%09%09return true;%0A%09%7D//End logout%0A%09%0A%09public boolean register(String regUsername, String regPassword, String regConfirmPassword, String registerEmail, String regDOB, String regContactNumber)%7B%0A%09%09try %7B%09%09%09%0A%09%09%09userdao.register(regUsername, regPassword, regConfirmPassword, registerEmail, regDOB, regContactNumber);%0A%09%09%09return true;%0A%09%09%7D %0A%09%09catch (DaoException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%09return false;%0A%09%09%7D%0A%09%7D//End login%0A%7D%0A%3E%3E%3E%3E%3E%3E%3E branch 'master' of https://github.com/AndrewKLeech/GCTEAMC%0A

fix merge conflict