easy c assignment vectors sorting searching

Develop Hardening Checklist for Windows 10
August 16, 2020
summary of an IEEE paper computer science homework help
August 16, 2020

easy c assignment vectors sorting searching

Part A: Selection Sort verses Bubble Sort Benchmark

This program will read data from file unsortedData.txt into two identical arrays.

Name these arrays selectionArray and bubbleArray.

Create a function called selectionSort that sorts the selectionArray data using the selection sort approach. The function should keep track of the number of exchanges made during the selection sort. Write contents of the sorted selection Array to a file named sortedSelectionData.txt and report the number of exchanges done

Next the program should sort the bubbleArray using a function named bubbleSort. Again, keep track of the number of exchanges that the bubble sort requires. Write the output of the sorted bubbleArray to a file named sorted sortedBubbleDatatxt.

Sample console output:

Reading selectionData.txt and copying into selectionArray and bubbleArray

Sorting selectionArray using linear sort

Number of exchanges was XX

Writing selectionArray to file sortedSelectionData.txt

Sorting bubbleArray using bubble sort

Number of exchanges was X

Writing bubbleArray to file sortedBubbleData.txt

The results of the PartA will be a two sorted data files and a screen capture. The data files will contain a data file using the selection sort method and a data file sorted using the bubble sort method. (Note, both files should be identical). Name the screen capture file screenCapturePartA. Upload the files to catalyst

Part B: Linear Search verses Binary Search Benchmark:

Write a program compares the number of steps needed by a Linear search verses steps needed for a binary search.

Program algorithm:

Reads the sortedBubbleData.txt created in PartA into an array name searchArray.

Call a function named linearSearch which uses the linear search method

Use the values 26, 50 and 92 for linear searches and report the number of steps needed

Call a function called binarySearch which uses the binary search method.

Use the values 26, 50 and 92 for do a binary searches and report the number of steps needed

Sample screen output:

Linear search for 26 was x steps. Value was found or not found

Linear search for 92 was y steps. Value was found or not found

Linear search for 50 was z steps. Value was found or not found

Binary search for 26 was x steps. Value was found or not found

Binary search for 92 was y steps. Value was found or not found

Binary search for 50 was z steps. Value was found or not found

Note that the searchArray size should be size 20 and the each search should report if the value being searched for is not found.

Part C: Car Sales Program using Vectors

Create a car sales report.

Use the following values for your data vectors

Salespersons:

“Aleshia”, “Evan”, “Frank”, “Ulysses”, “Tyisha”, “Eric”, “Marge”

CarsSold:

100, 200, 250, 175, 125, 150, 60

Sample of the report to create:

Sales Person Cars Sold % of Sales

Jane 60 5%

Bill 40 2%

James 150 8%

. . .

TopSalesPerson: Jane

Upload your source program file to carSales.cpp and screen capture of your carsReport to Catalyst

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.