Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
What you need to do?? You must implement the following functions in "MCS2514Pgm1.cpp" to make the program work: string loadDatabase(string filename) //Input: a filename as a string. This is the file from which to read data. //Output: a string indicating a status: whether or not the file was loaded successfully. Input files will have the following structure: 12 Joe Anyone 0 1 3 2 4 1 2 5 2 0 2 Sally Someone 2 1 4 2 4 2 3 4 6 1 2 ... ... First line is an integer indicates how many records are in the data file. The second line to the last line contains the records that are needed to load to the array of structs. Each line of the file will have someone's first name, last name, and NUMQUESTIONS integers (NUMQUESTIONS is a global constant declared in the file globals.h). You should read this data into an array of structs (the struct you defined should have three members: one for first names, one for last names, and one is an integer array holding the answers for that person). bool isDatabaseLoaded() //Input: none //Output: a bool indicating whether a database has been loaded. This function should return true if a database has been successfully loaded and false if one has not. string getFirstName(int id) //Input: an index into the array of structs //Output: the first name of the student in the location indicated by id in the array of structs. string getLastName(int id) //Input: an index into the array of structs. //Output: the last name of the student in that location of the array of structs. int* getAnswerArray(int id) //Input: an index into the array of structs. //Output: array of integers containing the answers of the student in that location of the array of structs. Please be careful about the array of structs and array of integers. For this function, it return the array that contains the answers of that person (that integer array is a member of the struct you defined). int* can be used as the address of an integer or an integer array (address of the beginning of array). So, you can return an array to int*. Please search Wikepedia or Google int* for more information. int compareAnswers(int answerArray1[], int answerArray2[]) //Input: two arrays of answers (array of size NUMQUESTIONS, type int) //Output: integer ranking, interpreted as a "similarity metric" between the values in the two arrays. void findTenBestMatches(int answerArray[], int returnArray[]) //INPUTS: 2 array of integers.(answerArray contains answers from GUI input) //OUTPUT: you need to find out the index of 10 best matches. Put these indexes in returnArray A similarity metric gives a measure of the degree to which the two array (passed into the function as parameters) match. Here is how to implement this: 1. Count up the number of times that both arrays have the same integer value at the same index. 2. Examine the answer to the final question (value in the last position in the array, at index NUMQUESTIONS-
1). This indicates which question should be considered "most important."
Use this information to weight that question. If there is a match for that particular question, weight it with a factor of two. Normal question matches will have a weight of just one.
In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.
Explain how will use a search tree to find the solution.
How to access virtualised applications through UNICORE
Write a recursive function to determine if a binary tree is a binary search tree.
Determine the mean salary as well as the number of salaries.
Currency Conversion Development
WSDL service that receives a request for a stock market quote and returns the quote
Design a GUI and implement Tic Tac Toe game in java
Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers
Data structures for a single algorithm
Write the selection sort algorithm
The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.
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!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd