Function_GUI - liorls/Ex1 GitHub Wiki

This class is an implementation of functions interface. It implements all the functions of a collection (size, isEmpty, contains, Iterator, both toArray functions, add, remove, containsAll,addAll,removeAll,retainAll,clear)

% In this class we warned against Exception by throws (in the title of the function) and try,catch (inside the function).

The functions:

  • Constructors
  • saveToFile- write to a given file name.
  • initFromFile- init a new collection of functions from a given file name.
  • drawFunctions - Draws all the functions in the collection in a GUI window.
  • drawFunctions (that reads from a Json file, using Gson)- draws all the functions in the collection in a GUI window using the given JSON file.