public static void addtoarray(String Username, String Password, String Subject1, String Subject2, String Subject3, String Subject4, String Subject5, String Subject6, String Subject7, int delete1)
    {
       
        if(Username != null && Password != null && Subject1 != null && Subject2 != null && Subject3 != null && Subject5 != null && Subject6 != null && Subject7 != null)
        {
        int ID = Member_details_array.getMembers().length;
       
       
       
        Member_details newuser = new Member_details(ID, Username, Password, Subject1, Subject2, Subject3, Subject4, Subject5, Subject6, Subject7, delete1);
        try {
            writearray(ID, newuser);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Member_details_add.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        
    }
        else
        {
             JOptionPane.showMessageDialog(null,"Please enter all the information required", "Timetable Management Program", JOptionPane.INFORMATION_MESSAGE);

        }
    }