Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help creating the function definitions for these 5 functions in C++. Any solution with an explanation would be greatly appreciated, and if you

I need help creating the function definitions for these 5 functions in C++. image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Any solution with an explanation would be greatly appreciated, and if you can try to explain the thought process behind developing them through comments that would be even better.
Thank you
Back myarrayfile.cpp Feb 10, 2019 - COP 3014 Program that implements the requirements of homework 4 #include "myarrayfile.h" #include // For time() #include // For srand() and rand() // This function will perform a linear search of the input myArray[I // arrayLength is the number of elements to search for in myArray[]. // If itemToFind is contained in myArray[] at least once then return true. // If itemToFind is not contained in myArray[] then return false. // If arrayLength is zero or negative then return false. // You can only access the bounds of myArray, that is you only access between // index 0 and index arrayLength-1 bool isltemlnArray(int myArray[], int arrayLength, int itemToFind) // This function will add all the even positive numbers in myArray. // The length of myArray is defined by arrayLength. // The value returned is the sum of all the even positive numbers in the array. // If there are no positive even integers in the array then return 0. // If arrayLength is zero or negative then return 0. // You can only access the bounds of myArray, that is you only access between // index 0 and index arrayLength-1. int addEvenPositive(int myArray[l, int arrayLength) // myArray. // The length of myArray is defined by arrayLength. // The value returned is the highest value in myArray. // If arrayLength is zero or negative then return 0. // You can only access the bounds of myArray, that is you only access between // index 0 and index arrayLength-1. int getHighest(int myArray[], int arrayLength) This function will find the hiahest value in // Implement a function that performs a quick pick function for the Florida Lottery // You are to fill myArray with six unique random numbers from 1 to 53. // All the six numbers must be different. // ) function which is provided to you. // You can also use isltemlnArray() function which is implemented above. VOI You should use getRandomlnteger(int void quickPick(int myArray[]) // do not make any changes to this function!!! // getRandomlnteger will return a random integer number between O and max int getRandomlnteger (int max) static bool initialized - false: if (initialized -- false) {// if the first time through then srand((unsigned)time(0)); // Initialize random number generator. initialized - true; int rv-rand() % (max + 1); return rV

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

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

how would you have done things differently?

Answered: 1 week ago

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago