Question: Consider yourself to be Sam who is a software engineer. He has been asked to build an employee management app. You have to use

Consider yourself to be Sam who is a software engineer. He has 

Consider yourself to be Sam who is a software engineer. He has been asked to build an employee management app. You have to use OOPS concept to build a few classes as outlined in the steps below. Tasks To Be Performed: 1. Create a class named Employee, with a constructor '__init__' method that accepts name and salary as parameters and set properties named name and salary. 2. Define_str____ method in Employee class so that when someone tries to print the object the string Name: employee_name, Salary: employee_salary is printed with the actual employee name and salary. 3. Create another class named Calculator, with methods to add, subtract, multiply and divide two numbers. 4. These methods take two numbers as parameters. 5. These methods will be called by a method named execute command. 6. Execute command takes in 3 parameters command which is string that can be either 'add', 'sub', 'mul', 'div', and two numbers and it will call the appropriate method based on command parameter.

Step by Step Solution

3.36 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Steps Solution Step 1 of 1 Implementation of the Employee and Calculator classes based on the given ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!