/*
 * Created on Aug 26, 2003
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package TestClasses;

/**
 * @author student
 *
 * To change the template for this generated type comment go to
 * 
 */
import DataClasses.*;
import DatabaseCommunication.UserManager;
public class DatabaseTester {

	public static void main(String[] args) {
		UserManager um = new UserManager();
		User_Data user = new User_Data();
		user.setUserName("samit724");
		um.readUser(user);
		
		System.out.println("user username : "+user.getUserName());
		System.out.println("user ncbId : "+user.getNcbId());
		System.out.println("user Type : "+user.getType());
		System.out.println("user account : "+user.getAccount());
		System.out.println();
		
		um.readStocksInterested(user);
		
		Stock_Data[] stocks = user.getStocksInterested(); 
		
		for(int i = 0; i<stocks.length; i++){
			Stock_Data temp = stocks[i];
			System.out.println("stock interested StockCode : "+temp.getStockCode());
			System.out.println("stock interested CompanyName : "+temp.getCompanyName());
			System.out.println("stock interested week high : "+temp.getWeekHigh());
			System.out.println("stock interested week low : "+temp.getWeekLow());
			System.out.println("stock interested Eps : "+temp.getEarningsPerShare());
			System.out.println("stock interested Dps : "+temp.getDividendsPerShare());
			System.out.println();
		}
	}
}
