@Override
	public void updateComputer(String name, Date introduced, Date discontinued,
			int companyId, int id) throws InstantiationException,
			IllegalAccessException, ClassNotFoundException, SQLException {
		ResultSet rs = null;
		Connection cn = null;
		cn = ConnectionFactory.open();
		PreparedStatement stmt = null;
		  
		java.sql.Date introducedSQL = new java.sql.Date(introduced.getTime());
		java.sql.Date discontinuedSQL = new java.sql.Date(discontinued.getTime());
	
		try {
			stmt = cn
					.prepareStatement("UPDATE  computer SET `name`=?, `introduced`=?, `discontinued`=?, `company_id`=? WHERE `id`=?;");
			
			stmt.setString(1, name);
			stmt.setDate(2, introducedSQL);
			stmt.setDate(3,  discontinuedSQL);
			stmt.setInt(4, companyId);
			stmt.setInt(5, id);

			stmt.executeUpdate();

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			try {
				if (rs != null)

					rs.close();

				if (stmt != null)

					stmt.close();

				if (cn != null)
					cn.close();
			} catch (SQLException e) {
			}
		}
	}