Testing documentation algorithm.

Assignment Help Basic Computer Science
Reference no: EM13764724

Your assignment files should be zipped into single file named your username.zip, and submitted on blackboard.

Questions 1 and 3 are programming questions and you should have a source file as well as testing documentation.
Assignments are to be done individually.

1. a) Write a program (including timing measurements) for the following scenario. Generate 20 million random numbers, one at a time, and insert them into an array that doubles every time it runs out of space (starting size of 2), into an array that can hold 20 million elements from creation, and a linked list that can hold 20 million elements. You should do this both for integers and floating point numbers. (The numbers should be regular integers or floats). Compare the time required for each of the six scenarios, and explain the differences. You will need to write your own way to double an array size (it's up to you how to do this), don't use an ArrayList.

b) Do a brute force in order search through each of these to find the largest number. Again, compare the timings for all 6 scenarios.

2. You do not need to implement this, just describe the algorithm.

a) Assume you have a robot with a light sensor and you want it to follow a trace (i.e. line) on the ground drawn with a thick marker. Design 2 different algorithms to follow this line and compare their efficiency. (The problem is a search one - if the line bends you need to find it again). Describe/draw/illustrate some worst, or at least bad cases and best case scenarios for your algorithms.

b) Consider the same problem but in 3 dimensions, e.g. a radar array (which produces something like a cone) searching through a sphere around an aircraft looking for incoming missiles or other aircraft.

3. Attached to this assignment is a file titled "A1BoyNames.txt" it is 536 lines long, but some lines have two names separated by a comma. Read in each name into a container structure of your choosing.

a. Using a binary search, and a hash function of some sort attempt to find the names Brian, Bryan, Iain, Ian, and Stefan.

b. Modify your program to search for partial matches (e.g. Bryant would match Bryan and Brian would match Ian).

Reference no: EM13764724

Questions Cloud

Prepare a direct labor budget for january : Prepare a direct labor budget for January through June. Direct labor averages $15 per hour. Prepare a manufacturing overhead budget for the same period.
What is the ringi system : What is the ringi system? How does the ringi system facilitate the productivity of an organizational team? What are the theoretical approaches to motivation?
Creating a program that writes to a data file : Creating a program that writes to a data file called Celtofarendfile.txt using the end of file structure. The program should create a conversion table of Celsius to Fahrenheit from 0 to 100 Celsius in increments of 5.
Materials and labor variances : Last year Vera Corporation budgeted for production and sales of 20,000 cloth handbags. Vera produced and sold 19,250 handbags. Each handbag has a standard requiring 4 feet of material at a budgeted cost of $2.50 per foot and 45 minutes of sewing t..
Testing documentation algorithm. : Your assignment files should be zipped into single file named your username.zip, and submitted on blackboard.
What are three pricing policies used by international firms : What are the three pricing policies used by international firms? What international marketing approaches are typically associated with each pricing policy?
Evaluate the importance quality of service has to designers : Evaluate the importance quality of service has to designers. Choose two areas discussed in the textbook you would focus your attention to ensure quality of service for a team of designers that you were managing. Justify your choices.
Financial statement and notes of a public company : In the United States, a public company's financial statements must be according to Generally Accepted Accounting Principles (GAAP). These principles are cost, revenue recognition, and matching principles.  Examine the financial statement and notes..
Purposes and goals of punishment a judge : Discusses four purposes/goals of punishment a judge might consider when imposing a sentence on a convicted individual. In a 2-page essay, discuss those sentencing options ensuring the pros and cons of each goal are discussed

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Why would you use the const keyword

What is the const keyword in C++? Why would you use the const keyword?

  Design a program that asks for the price of each item

Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of the sales tax and the total.

  Offer an example of a query

Can we offer an example of a Query in which we can use a parentheses to affect the order of execution in which the WHERE Clause has both AND and OR Logical Operators?

  Database trends

Database Trends

  Estimate the mean and variance of the number of times

Estimate the mean and variance of the number of times you have to roll 2 dice until the total exceeds 100.

  Find whether bit string contains two consecutive one bits

You wish to find out whether bit string contains two consecutive 1 bits. Obviously, you can do this using n probes. For which values of n in range {3, 4, 5, 6, 7} can this be done using fewer than n probes?

  Jewelers is a small jewelry company in a college town

Especially for You Jewelers is a small jewelry company in a college town. Over the last couple of years, it has experienced a tremendous increase in its business. However, its financial performance has not kept pace with its growth. The current syste..

  Convert decimal number in sixteen bit binary

Convert decimal number +25 and +3 in 16-bit binary. Illustrate your work. Add binary numbers in above question using rules for binary addition.

  Web servers containing customer portals

All departments--including Finance, Marketing, Development, and IT--connect into the same enterprise switch and are therefore on the same LAN. Senior management (CEO, CIO, President, etc.) and the Help Desk are not on that LAN; they are connected ..

  Identify darwin two basic layers

1. Identify the four primary layers in the functional view of OS X ? 5. What is Darwin ? Identify Darwin's two basic layers ?

  Common information security threats

Common Information Security Threats

  Compute monthly payment for car

Compute the monthly payment for $ 22,000 car with a $3,500 down payment and $500 trade-in if term of loan is 5 years and the annual interest rate is 5%.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd