The program will implements an array with 100 elements. Your program should: 1. Load the
array with 10 floating point numbers - this should be accomplished
by: 2. It should
then print out the number of elements that have been loaded into the array
- this should be accomplished by: for(c=0;
c<arr.nElems; ++c) GetElems is a
member method of the class "linear".
3. Add a method called "FindLindex(int number)" to your class that will search for a specific number, in the array. If the number is found it will return the index in the array at which the number was found. If the number was not found it will return a "-1", to indicate that the number is not in the list.
***This will be covered in class through a handout and lecture on class use and methods. Answer these questions concerning arrays: When performing a linear search through an array, of 'n' elements what is the a) Best case formula: b) Average case formula: c) worst case formula: * For finding a specific number.
*** You should add your answers to the above questions to your program code, as a comment...
Please turn in your assignment by using the Assignment Turn-in at tinyRealm.com BBS. Just post a "Reply" to the lab assignment message and upload your assignment (by "Attaching" a file to your reply message). You should attach your entire project zipped up in "zip" or "rar" format.
Naming convention: class_lab#_YourInitials.format mine would look like: cisc4305_l1_efa.zip
|