Well I did not have a problem with my last program assignment which involved me making the Student class that I attached below, But in my new assignment i have too Write a program that will use the Student class developed in the previous assignment to provide a menu-based interactive capability. The program will also read/write files. You may have to modify your original Student class.
The main method will create the files and display a menu, read the user's choice from the keyboard, and perform the corresponding action. After each action, the menu is displayed again. This continues until the user chooses "Exit".

Choice 1 will read the next line from the input file, create the student object,
and assign its instance variables.
Choice 2 will prompt the user to create a new student object as in the previous
assignment
Choice 3 will display the student's info in the format given below.
Choice 4 (change info) will display the following submenu:

Change student info
------------------------------------------
1 - change credit hours
2 - change residency (in-state/out-of-state)
3 - change financial aid status and amount
4 - return to main menu

The user is prompted for the new value, and the submenu is redisplayed until
"return to main menu" is selected.

Choices 5 and 6 will display the student's bill on the screen and write it to
the output file, respectively, using the format in the previous assignment.
Output two blank lines after each student bill.

And I don't really know anything about reading from a file or writing out to a file in java and ive done some research on it but none of it is getting through to me, if anyone could help it would be greatly appreciated, I have also attached my p7 file which is the code i have so far on my new assignment and how i have it set up, Thank you to anyone who can help

Attachments
//------------------------------------------------------

// "Brain Glass, Brandon Ripley"
// CMSC 255 - section 902
// Assignment 9
//
// 
//
//-------------------------------------------------------

//-------------------------------------------------------
// Class BMRRGBp9
//
// Top-level program class
//
//-------------------------------------------------------

import java.util.Scanner; 
import java.io.*;
public class BMRRGBp9Lab
{
	//-----------------------------------------------------
 	// Method main Class BMRRGBp9
 	//
 	//Reads from a input file,to seperate classes for semesters
	//finds out the over all GPA and prints back out
	//-----------------------------------------------------
	public static void main(String[]args) throws IOException
	{
	String input,filename;
    Scanner scan = new Scanner (System.in);
    
    BMR_Student BMR_studentObjects = new BMR_Student();
    BMR_Studentp7 BMR_studentOb = new BMR_Studentp7();
    
    System.out.println(" Student billing system ");
    System.out.println("-------------------------------");
    System.out.println(" 1 - Read next student from file");
    System.out.println(" 2 - Enter new student manually");
    System.out.println(" 3 - View student's info ");
    System.out.println(" 4 - Change student's info ");
    System.out.println(" 5 - View student's bill ");
    System.out.println(" 6 - Write student's bill to file ");
    System.out.println(" 7 - Exit");
    
    System.out.print(" Which menu item would you like to choose(1-7 please) : ");
    input = scan.nextLine();
    
    switch (input)
    {
    	case 1:
    	{
    		Scanner scanFile = new Scanner(new File(filename));//makes a scanner for the filename
    		
    	}
    	case 2:
    	{
    		BMR_studentObjects.Name();
			BMR_studentObjects.Credits();
			BMR_studentObjects.Resident();
			BMR_studentObjects.Room();
			BMR_studentObjects.Board();
			BMR_studentObjects.FinancialAid();
			BMR_studentObjects.CreditCosts();
			BMR_studentObjects.CalltoString();
			BMR_studentObjects.SubTotal();
			BMR_studentObjects.Total();
			BMR_studentObjects.Output();
			BMR_studentObjects.Recalculate();
			System.out.println();
			System.out.println();
			System.out.println(" THE NEW BILL");
			BMR_studentObjects.Output();
			System.out.println();
			System.out.println();
			BMR_studentObjects.Student();
    	}
    	case 3:
    	{
    		BMR_StudentOb
    	}
    		
    }
//------------------------------------------------------

// "Brandon Ripley"
// CMSC 255 - section 902
// Assignment 6
//
// 
//The program will input info to compute a student's semester bill
//-------------------------------------------------------

//-------------------------------------------------------
// Class Student
//
// Top-level program class
//
//-------------------------------------------------------

import java.util.Scanner;
import java.text.DecimalFormat;

public class BMR_Student
{
	//--------------------------------------------------
	//Method Main Class Student
	//
	//Inputs student info to compute student bill
	//--------------------------------------------------
	String name, vares = "no",room = "no", board = "no",finaid = "no",idnumber;
	int credits = 0, finmoney = 0, roomcost = 0,boardcost = 0, fees = 857;
	double state = 8944, subtotal = 0, total = 0;
	//resets the values
	public void Student()
	{
		name = "";
		vares = "no";
		room = "no";
		board = "no";
		finaid = "no";
		idnumber = "";
		credits = 0;
		finmoney = 0;
		roomcost = 0;
		boardcost = 0;
		fees = 857;
		state = 8944;
		subtotal = 0;
		total = 0;
	}
	
	//Input Student ID#
	public String ID()
	{
		Scanner scan = new Scanner(System.in);
		
		System.out.print("Enter student's STN(without hypens please): ");
		idnumber = scan.nextLine();
		return idnumber;
	}
	
	//Input Student name
	public void Name()
	{
		Scanner scan = new Scanner(System.in);
		
		//student's name
		System.out.print("Enter the Student's name: ");
		name = scan.nextLine();
	}
	
	//Input Credit hours
	public void Credits()
	{
		Scanner scan = new Scanner (System.in);
		
		//checks for any hours from 1 to 21
		while(credits > 21|| credits < 1)
		{
			System.out.print("Enter credit hours taken: ");
			credits = scan.nextInt();
			scan.nextLine();
		}
	}
	
	//Input Virginia Resident
	public void Resident()
	{
		Scanner scan = new Scanner(System.in);
		
		//Instate or Outstate Tuition costs
		System.out.print(" Virginia Resident (yes or no)? ");
		vares = scan.nextLine();
	}
	
	//Input Room costs
	public void Room()
	{
		Scanner scan = new Scanner(System.in);
		
		//Room Costs
		System.out.print(" Room(yes or no)? ");
		room = scan.nextLine();
		if (room.equalsIgnoreCase("yes"))
			roomcost = 2029;
	}
	
	//Input Board costs
	public void Board()
	{
		Scanner scan = new Scanner(System.in);
		
		//Board Costs
		System.out.print(" Board(yes or no)? ");
		board = scan.nextLine();
		if(board.equalsIgnoreCase("yes"))
			boardcost = 1535;
	}
	
	//Input Financial Aid amount
	public void FinancialAid()
	{
		Scanner scan = new Scanner(System.in);
		//Financial Aid
		System.out.print(" Financial Aid(yes or no)? ");
		finaid = scan.nextLine();
		//This will calculate how much FA
		if(finaid.equalsIgnoreCase("yes"))
		{
			System.out.print(" Enter amount of finacial aid: ");
			finmoney = scan.nextInt();
			scan.nextLine();
		}
	}
	
	//calculates Subtotal
	public void SubTotal()
	{
		subtotal = state + roomcost + boardcost + 857;
	}
	
	//calculates the total cost
	public void Total()
	{
		total = subtotal - finmoney;
	}
	
	//calculates the credit costs
	public void CreditCosts()
	{
		//checks for credit hours out of state
		if (credits < 12)
			state = credits * 745;
		if (credits > 18)
			state = ((credits - 18)*745) + 8944;
		if (vares.equalsIgnoreCase("yes"))
		{
			state = 2932;
			//does another check for credit hours for instate price
			if(credits < 12)
				state = credits * 244;
			if(credits > 18)
				state = ((credits - 18) * 244) + 2932;
		
		}
	}
	
	//The output
	public void Output()
	{
		DecimalFormat fmt = new DecimalFormat("0");
		
		//outputs the name,studentid, and credits
		System.out.println(toString(name,idnumber,credits));
		
		//Tutition
		WhiteSpace(name,7);
		System.out.print("Tuition ");
		Spacing(state);
		System.out.print(fmt.format(state));
		if (vares.equalsIgnoreCase("yes"))
			System.out.println("  In State");
			else
				System.out.println("  Out State");
				
				//Fees
				WhiteSpace(name,4);
				System.out.println("Fees   "+fees);
				
				//Room
				if(roomcost == 2029)
				{
					WhiteSpace(name,4);
					System.out.println("Room  "+roomcost);
				}
				
				//Output Board fees if exists
				if(boardcost == 1535)
				{
					WhiteSpace(name,5);
					System.out.println("Board "+boardcost);
				}
				
				WhiteSpace(name,0);
				System.out.println("---------");
				
				//Output Subtotal
				WhiteSpace(name,8);
				System.out.print("Subtotal ");
				Spacing(subtotal);
				System.out.println(fmt.format(subtotal));
				
				//output FA
				WhiteSpace(name,13);
				System.out.print("less Fin. Aid ");
				Spacing(finmoney);
				System.out.println(finmoney);
				
				WhiteSpace(name,0);
				System.out.println("---------");
				
				//Outputs the Total
				WhiteSpace(name,5);
				System.out.print("Total ");
				Spacing(total);
				System.out.print(fmt.format(total));
	}
	
	//toString
	public String toString(String name, String idnumber, int credits)
	{
		return "Name: " + name + " STN: " + idnumber + "\n" + "Credit hours: " + credits + "\n\n"; 
	}
	
	//Calls the toString method
	public void CalltoString()
	{
		System.out.println(toString(name,idnumber,credits));
	}
	//Recalculates Costs
	public void Recalculate()
	{
		state = (state * .10) + state;
		fees = fees + 50;
		if (finmoney > 0)
		finmoney = finmoney + 300;
		SubTotal();
		Total();
	}
	
	//The spacing for the Outputs
	public void WhiteSpace(String name, int length)
	{
		length = 6 + name.length() - length;
		for(int i=0;i <= length; i++)
			System.out.print(" ");
	}
	
	//spacing to do the line up for the numbers
	public void Spacing(double spaces)
	{
		if(spaces >= 0 && spaces < 10)
			System.out.print("    ");
		if(spaces >= 10 && spaces < 100)
			System.out.print("   ");
		if(spaces >= 100 && spaces < 1000)
			System.out.print("  ");
		if(spaces >= 1000 && spaces < 10000)
			System.out.print(" ");
	}

}

yes that helps but also how would i go about changing the student class to use the input from a txt file to fill out the information

This class allows you to read an input file.txt specified when invonking the constructor.
It prints out line by line. You can save each line into an array if you want to. Or you can save each word in the line into an array by invoking the split function.

This article has been dead for over six months. Start a new discussion instead.