Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview In this assignment you will be implementing and testing both the Linear Search and Binary Search algorithms .. You will also be writing a

Overview In this assignment you will be implementing and testing both the Linear Search and Binary Search algorithms .. You will also be writing a driver to test the search algorithms and you will be measuring the run times of each search. Details

1. TestTimes Class You will write the TestTimes.java class which will implement the TestTimesInterface. The interface may be downloaded from TestTimesInterface.java The TestTimes class will contain an array of 10 long values and a counter of how many values have been added using addTestTime (long testTime). Every time a new test time is added, the counter is incremented.

2. Linear Search Class You will write the LinearSearch.java class which will inherit from TestTimes.java and implement the Search Interface using a lincar search algorithm. The interface may be downloaded from Searchinterface.java Please note that your search method must measure the run time and add it to the TestTimes class by using the addTestTime() method.

3. Binary Search Class You will write the BinarySearch.java class which will inherit from TestTimes.java and implement the Search Interface using a binary search algorithm. The interface may be downloaded from SearchInterface.java Please note that your search method must measure the run time and add it to the TestTimes class by using the addTestTime() method.

4. Driver Class You will write the driver.java class to test your implementations of TestTimes.java 2 LinearSearch.java BinarySearch.java The Driver.java will implement the Driver Interface. The interface may be downloaded from Driver Interface.java Please note that, in addition to implementing the Driver Interface, you are also required to write your own public static main(String[] args) method in Driver.java that tests all of your classes and methods before submitting your assignment on mimir.

PLEASE BE CLEAR DO NOT PUT THEM TOGETHER EACH CODE MUST BE SEPARATE EXCEPT DRIVER CLASS THANK

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

When is a pie chart better than a bar chart for illustrating data?

Answered: 1 week ago

Question

=+For a different audience? In another tone of voice?

Answered: 1 week ago

Question

=+Can it illicit audience participation?

Answered: 1 week ago

Question

=+Create an open dialogue among users?

Answered: 1 week ago