Reference no: EM13168181
In an accident, the Ohio phonebook has gotten mixed up. The names are now really out of order. You and your enthusiastic, but naive, assistant Carl must fix the problem. No one can use the phonebook while you are sorting it, so every extra second of sorting time will cost the city billions in economic damage.
Carl has implemented two programs, P1 and P2. Both will do the job correctly. You must decide which one will be faster.
1.Carl picks 20 random names and finds that P1 sorts them faster than P2. "We're using P1!" exclaims Carl. Why are you hesitant to commit?
2.Trying to please you, Carl is now sorting 10,000 names with each program. (a) If P1 is still faster on this larger set, will you then agree it will be faster on the whole million-name phonebook? (b) What if P2 is now faster - does that mean P2 is the best choice for the whole phone book? Explain.
3.Your computer explodes and Carl puts together a new one from spare parts. The new computer is much faster at arithmetic, but is slower at reading and writing to the disk. Might this affect which program you should use? Discuss.
4.In deciding which program to use, is it safer to run lots of tests or read the source code? Or should you do both? Explain. (Note: Carl's code is clear and well-commented.)
Show the contents of the id array
: Show the contents of the id array after each union operation when you use the quick find algorithm (Program below) to solve the connectivity problem for the sequence 0-2, 1-4, 2-5, 3-6, 0-4, 6-0, and 1-3.
|
Allows a user to select a favorite basketball team
: Write an application that allows a user to select a favorite basketball team from a list box. Include at least five teams in the list, and display the chosen team in a text field after the user makes a selection. Save the file as JBasketball.java. :
|
Your company has assigned you the task
: Your company has assigned you the task of evaluating its computer networks. You are to write a memo covering 15 points on which you will evaluate the technology, connectivity, and functioning of the company's computer networks
|
How to select the primary key
: How to select the primary key from the candidate keys? How do foreign keys relate to candidate keys? provide examples from either your workplace or class assignments
|
Ohio phonebook has gotten mixed up
: In an accident, the Ohio phonebook has gotten mixed up. The names are now really out of order. You and your enthusiastic, but naive, assistant Carl must fix the problem. No one can use the phonebook while you are sorting it, so every extra second of ..
|
A university library database records
: A university library database records information about books; for each book, it records the book isbn number (which is unique), and the book name. In addition, it records which books have been checked out
|
Program that computes and prints the value of 6!/5! using
: Write a Java program that computes and prints the value of 6!/5! using Scanner.
|
The method takes an array
: The method takes an array of integers and returns true if there exists any item in the array that satisfies a specified condition. For instance, the following code fragment:
|
Write a class volumeofbox that calculate the volume
: write a class VolumeOfBox that calculate the volume by this formula : length * breadth *
|