Define a class Employee for employees, create N objects of Employee, sort these objects and search,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these accounting questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
After numerous campus interviews, Greg Thorpe, a senior at Great Northern College, received two office interview invitations from the Baltimore offices of two large firms. Both firms offered to cover...
-
Two parallel plates have equal and opposite charges. When the space between the plates is evacuated, the electric field is E = 3.20 X 105 v/m. When the space is filled with dielectric, the electric...
-
Poly (vinyl butyral) is used as the plastic laminate in the preparation of automobile windshield safety glass. How would you synthesize thispolymer? Polylvinyl butyral)
-
On January 2, 2010, Shine Lights purchased showroom fixtures for $18,000 cash, expecting the fixtures to remain in service for five years. Shine Lights has depreci ated the fixtures on a...
-
Stillwater Designs expanded its market by becoming an original equipment supplier to DaimlerChrysler. At the time, DaimlerChrysler wanted to offer a high-end Kicker audio package for its Dodge Neon...
-
Pastina Company sells various types of pasta to grocery chains as private label brands. The company\'s reporting year - end is December 3 1 . The unadjusted trial balance as of December 3 1 , 2 0 2 1...
-
Tesla Motors, Inc. is in the business of developing, manufacturing, and selling technology for high-performance electric automotive and powertrain components. Hoping to develop a greater worldwide...
-
Q1: If you were to compare Indian and Chinese institutions, what conclusions would you reach about the economic future of the two countries? How do they differ from the developed countries we have...
-
Describe the records most commonly kept by salespeople.
-
'If all employees behave ethically, there is no need for expensive control systems to manage working capital.' Do you agree or disagree with this statement? Why?
-
Carefully analyze the following types of selling positions: a. A territory selling position for a national manufacturer that requires the salesperson to provide customer service to a large number of...
-
Time management is an important part of a successful salespersons job. Using your search engine, examine the Internet for information on time management. Type time management + selling. Examine the...
-
What is meant by property and equipment? At what amount is each item of property and equipment listed on the balance sheet?
-
Aniyah borrowed $82,000, on a 120-day 4% note. After 50 days, Aniya made an initial payment of $40,000. On day 90, Aniyah made an additional payment of $25,000. Assuming the U.S. Rule, what is the...
-
Reread the discussion leading to the result given in (7). Does the matrix sI - A always have an inverse? Discuss.
-
Traditional password entry schemes are susceptible to shoulder surfing in which an attacker watches an unsuspecting user enter his or her password or PIN number and uses it later to gain access to...
-
Write a fragment of code that will change the integer value stored in x as follows. If x is even, divide x by 2. If x is odd, multiply x by 3 and subtract 1.
-
Write a program to answer questions like the following: Suppose the species Klingon ox has a population of 100 and a growth rate of 15 percent, and it lives in an area of 1500 square miles. How long...
-
Identify a company that integrates goods and services similar to the LensCrafters example. Use the framework in Exhibit 5.1 to write a short case study about the company in a similar fashion as the...
-
Airbags are designed to protect passengers from frontal or near-frontal crashes. Their designs and performance have improved dramatically since their introduction in the 1980s. Exhibit 5.19 shows a...
-
Glen County manages a waste-to-energy facility that burns 2,000 tons of trash per day and generates over \($20\) million in electricity annually while costing state and local taxpayers \($24\)...
Study smarter with the SolutionInn App