Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help in C++ assignment. Requested files : Mergesort.h, Mergesort.cpp, Mergesort_test.cpp (Download) Type of work : Individual work For this program, you will learn

I need help in C++ assignment.

Requested files: Mergesort.h, Mergesort.cpp, Mergesort_test.cpp (Download) Type of work: Individual work

For this program, you will learn about using an index into an array to sort the array contents. The chapter gives you several examples of implementing sorts using indices into an array.

Your program must open the binary file threesData.bin and read each element into an array. Once the integers have been read in, you will write one or more functions that sorts the integers in the array into ascending order (low to high.) Your program should sort this array using the Mergesort.

Mergesort is a method that uses divide and conquer to sort a list of items.

Divide the list into two equal or nearly equal lists.

Sort each half of the list into ascending order using selectionsort from the textbook..

Merge the two sorted lists into one sorted list by repeatedly removing the smaller of the two items at the front of each list and putting it in the final array.

Your program should be organized using the practice we have adopted: Mergesort.h, Mergesort.cpp and Mergesort_test.cpp which contains your main() function.

Your program should write the sorted data to a file name "sortedThreesData.bin" This file will be examined to determine your grade.

Note: Do not use vectors for this program. Please add comments for each code lines and please write the program in Xcode (Because i use macbook). 

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

Re-create Model

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago