public void setSaveFile()  //sets file instance variable
  {
    //FILL IN THE CODE:
    //set file to null
  	file = null;
  	//create JFileChooser dialog box
  	JFileChooser fc = new JFileChooser(new File(System.getProperty("user.dir")));
    //set Dialog box mode and title bar 
    fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
    fc.setDialogTitle("Save File"); 
    //Set option when user finished browsing to file to be created &/or saved
    int option = fc.showSaveDialog(null);
    //if user chooses OK
    if(option == JFileChooser.APPROVE_OPTION) //User chooses OK
    {
      //get file to be saved entered by user
    	file =  fc.getSelectedFile();
      //if file is null
    	if (!hasFile())
    		JOptionPane.showMessageDialog(null, "Unsuccessful:  empty filename");         //print empty filename message  
    }
  }