Create a class Vertegenwoordiger
Instance Variables
The class has two instance variables:
- a name (string) to store the name of the vertegenwoordiger (representative)
- a turnover (float) to store the representative’s omzet (turnover)
Methods
- add a constructor with arguments of a string and a float. These arguments are used to initialize the two instance variables. The constructor uses default values of an empty string for the name and a turnover of 0.0.
- add getters and setters for the two instance variables
- add a
__str__
method that returns a representative as a string.
The string has the following format Vertegenwoordiger{naam=’[naam]’, omzet=[omzet]},
Example: Vertegenwoordiger[naam=’Frederik Gailly’, omzet=567.89]