You are expected to work on your own Preferred visual studio, but you can use repl as well. • Must make sure to compile, build and run the code and program should be (a) compilation error free and (b) logical error free. • Must Validate the program with different types of data (both data arrangements and type of data). • Must attach the results along with your source code. Assignment: Write four different functions: a) void SelectionSort(Data "A, int N), where A is the array and N is number of data in the array. Data is the datatype, which you can declare first as a global declaration, by using typedef int Data; This helps by changing the datatype of the data to be sorted casily. b) int Min(Data *A, int start, int N); // this will return the index min, for the smallest data from the data set Afstart] to A[N-1] e) void InsertionSort(Data A, int N): d) void PrintArray(Data * A, int N), when called this function will display all the data in the array A Also, write the driver function (i.e. the main), main should do the following: i) Declare the array dynamically, so that memory can be used efficiently. To declare an array dynamically, the following steps may be used: • Declare a pointer of type Data Data * A: • Declare number of data N, and read a value for N • Allocate memory A= new Data (N] ii) Prompt the user to enter N number of data, and store those data in the array, by using a loop and cin statement to read the data. iii) Declare a variable sortType as integer and ask user to enter a value for sort Type.
You are expected to work on your own Preferred visual studio, but you can use repl as well. • Must make sure to compile, build and run the code and program should be (a) compilation error free and (b) logical error free. • Must Validate the program with different types of data (both data arrangements and type of data). • Must attach the results along with your source code. Assignment: Write four different functions: a) void SelectionSort(Data "A, int N), where A is the array and N is number of data in the array. Data is the datatype, which you can declare first as a global declaration, by using typedef int Data; This helps by changing the datatype of the data to be sorted casily. b) int Min(Data *A, int start, int N); // this will return the index min, for the smallest data from the data set Afstart] to A[N-1] e) void InsertionSort(Data A, int N): d) void PrintArray(Data * A, int N), when called this function will display all the data in the array A Also, write the driver function (i.e. the main), main should do the following: i) Declare the array dynamically, so that memory can be used efficiently. To declare an array dynamically, the following steps may be used: • Declare a pointer of type Data Data * A: • Declare number of data N, and read a value for N • Allocate memory A= new Data (N] ii) Prompt the user to enter N number of data, and store those data in the array, by using a loop and cin statement to read the data. iii) Declare a variable sortType as integer and ask user to enter a value for sort Type.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education