Search for question
Question

Write a class called Employee which has attributes Name (string), Employee (integer) and Budget (dictionary with Project Code as a key and budget as a value). The class must have a constructor, which will take name and employee id to initialize object. Note that if employee id is not given in the object creation, -1 should be assigned for employee id. Constructor will create an empty dictionary for the Budget attribute. A method called show Info should be printing Employee name and id. Last method for the class Employee will be enter Project, which will ask the user to enter the number of projects, enter the name of projects and their budget into the Budget attribute, and finally find the Projects with their budget, which are less than 1000. Create an objectemp1 with the name 'Mohammad' and call the methods show Info and Enter-project.

Fig: 1

Fig: 2