So my professor wants me to implement read from and write to .txt functionality in my current program. I've only implemented read/write to txt once and that was with integers using a postfix annotation.

So I'd like my program to start by asking the user which way they would like to input their data. 1 by entering it into the console or 2 by reading from a .txt file.

If they choose number 2 I would like to print out a pre-formatted text file which allows them to enter what actions they want to take in the lines below the instructions given. This is also the same .txt file from which I would like the program to read... so for example:

Please enter an action: add, assign, or exit. If you want to add a recruit please enter the name of the recruit after the action. If you want to perform multiple actions, then continue those actions on the same line. Type exit when you wish to exit.
<user input>

The program would skip the first line of the text file, which are the instructions given and read the actions of the second line and print to an output.txt file informing the user of the actions taken.

I would like to create two methods, one for the read and one for the write.

Here are my problems:
1. My professor wants the implemented linked-stack structure to be made of Object-type nodes. Is this going to be a problem when I try to read/write from/to the txt files since they are expecting String types?
2. How do I implement Exception handling with read/write functions? Like if the user saves an incorrect input to the .txt file, how do I get the program to throw an exception and write it to the output .txt?
3. How can I get the read method to skip to the second line of the .txt file where the user inputs will be? Is there a skipLine() method within a buffered reader class?

Anyways, here is my code so far:

LLObjectNode
package Assignment4;
 
public class LLObjectNode {
 
	private LLObjectNode link;
	private Object info;
 
	public LLObjectNode(Object info)
	{
		this.info = info;
		link = null;
	}
 
	public void setInfo(Object info)
	{
		this.info = info;
	}
 
	public Object getInfo()
	{
		return info;
	}
 
	public void setLink(LLObjectNode link)
	{
		this.link = link;
	}
 
	public LLObjectNode getLink()
	{
		return link;
	}
}
LinkedStack
package Assignment4;
 
public class LinkedStack implements UnboundedStackInterface
{
protected LLObjectNode top;
 
	public LinkedStack()
{
	top = null;
}
 
	public boolean isEmpty()
{
	if(top == null)
		return true;
	else
		return false;
}
 
	public void push(Object element)
{
	LLObjectNode newNode = new LLObjectNode(element);
	newNode.setLink(top);
	top = newNode;
}
 
	public void pop() throws Exception
{
	if (!isEmpty())
		top = top.getLink();
	else
		throw new Exception("pop attempted on an empty stack.");
}
 
	public Object top() throws Exception
{
	if(!isEmpty())
		return top.getInfo();
	else
		throw new Exception("Top attempted on an empty stack.");
}
 
}
LLStackMain... so far
package Assignment4;
 
import java.util.*;
import java.io.*;
 
public class LLStackMain 
{
	public static void main(String[] args) throws Exception
	{
		LinkedStack lStack = new LinkedStack();
		String response1;
		String response2;
		Object holder;
		boolean done = false;
 
		Scanner kybd = new Scanner(System.in);
 
		FileReader fReader = new FileReader("Instructions.txt");
		BufferedReader bReader = new BufferedReader(fReader);
 
		FileWriter fWriter = new FileWriter("userOutput.txt", true);
		PrintWriter pWriter = new PrintWriter(fWriter);
 
		System.out.println("This program allows you to add new recruits to a boot camp.\n" +
				"You can deploy the most recent recruit to assignment.\n");
		System.out.println("First you must choose how to enter the data.\n" +
				"Enter 'user input' if you would like to enter into the console," +
				" or 'file input' if you would like to read the data from a file");
			response1 = kybd.nextLine();
 
	try{
 
		if(response1.equalsIgnoreCase("user input"))
		{
 
			while (!done)
			{
				try
				{
				System.out.println("What would you like to do? add,assign, or exit?");
				response2 = kybd.nextLine();
 
				if (response2 == "add")
				{
					System.out.println("Please enter the name of the recruit you would like to add");
					holder = kybd.next();
					lStack.push(holder);
				}
 
				else if (response2 == "assign")
				{
					System.out.println("Recruit " + lStack.top() + "Was given assignemnt.");
					lStack.pop();
					System.out.println(lStack.top() + "Is now awaiting assignment.");
				}
				else if (response2 == "exit")
				{
					System.out.println("Now exiting program.");
					done = true;
				}
				}
				catch(Exception e)
				{
					System.out.println("Input was incorrect.");
				}
			}
 
		}
		else if(response1.equalsIgnoreCase("file input"))
		{
			System.out.println("Please refer to directory C:/Users/Galen/Java/Workspace/Data Structures/src/Assignment4.\n" +
					"and open the Instructions.txt to continue.");
			System.out.println("Enter 'ready' once you have completed the file to be read.");
			response2 = kybd.nextLine();
 
			try
			{
				if(response2.equalsIgnoreCase("ready"))
				{
 
				}
			}
			catch(Exception e)
			{
				System.out.println("Input was incorrecct.");
			}
 
		}
 
	}
	catch (Exception e)
	{
		System.out.println("Input was inccorect.");
	}
}
 
	//Where I would like the read and write methods to be
}

I know this is asking a lot,but our teacher didn't go over read/write past saying we needed to implement it and I've been spending hours searching the internet for read/write tutorials and can't seem to find the answers.

Thank you for any help!