Question: Define a class Employee for employees, create N objects of Employee, sort these objects and search, the specific requirements are as follows. Fields of

Define a class Employee for employees, create N objects of Employee, sort

Define a class Employee for employees, create N objects of Employee, sort these objects and search, the specific requirements are as follows. Fields of Employee at least include name, ID, department, salary, birthday. Create N (N>10000) objects of Employee, and the values of instance variables for these objects should be different. a) b) Sort these Employee objects with InsertionSort and Quicksort by name and birthday, print the first 10 objects' fields to check if the results are correct, and record the times costed by these sortings in table 1. You need ensure that different algorithms have the same input data sequence. InsertionSort Quicksort Table 1 Performances of sorting N lists Binary search trees or AVL trees Hash tables Costed time By name d) Search for employees by name and age respectively, and different data structures should be used to store Employee objects before searching, including lists, binary search trees or AVL trees, hash tables. Record the times spent on sorting in table 1. You need ensure that different algorithms have the same input data sequence. Costed time By birthday Table 2 Performances of search Costed time by name Costed time by age

Step by Step Solution

3.49 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure Ill provide you with the implementation of the Employee class sorting algorithms Insertion Sort and Quick Sort and search operations using different data structures Heres the code in Python pytho... 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 Accounting Questions!