วันพฤหัสบดีที่ 12 กุมภาพันธ์ พ.ศ. 2552

AFDMB - Assignment 1 Array

วิชา Advanced File and Data Management for Business
Assignment 1 กำหนดส่งภายในวันที่ 23 มกราคม 2552

รายละเอียดของงาน :


Exercise 1 on page 85

Create a data file consisting of at least 100 stromg va;ies. You can create the list yourself, or perhaps copy the values from a text file of some type , or you can even create the file by generating random strings. Sort the file using each of the sorting algorithms discussed in the chapter. Create a program that times each algorithm and outputs the times in a similar manner to the output from the last section of this chapter.

Exercise 4 on page 98

Using the CArray class with the SeqSearch method and the BinSearch method, create an array of 1,000 random integers. Add a new private Integer data member named compCount that is initialized to 0 . In each of the search algorithms, add a line of code right after the critical comparison is made that increments compCount by 1. Run both methods, searching for the same number, say 734, with each method. Compare the values of compCount after running both methods. What is the value of compCount for each method? Which method makes the fewest comparisons?

Source Code : http://www.mist4.com/community/viewtopic.php?t=142

ไม่มีความคิดเห็น:

แสดงความคิดเห็น