Starting from:
$30

$24

Programming Project 6 Solution



The file organization, the structure ADT, and the function arguments with structure.




Reference: (Sections 8.3, 11.5) prog 8-4, 8-5, 11-4, 11-6 And Programs 12-2, 12-3, and 12-4,




And (section 10.4), program 10-9.




a. Create a text file of 15+ products including product Names, unit prices, quantities sold, and sales of each product in your computer file. Then input the file into an array of structure ADT to your program.




b. You need to print out the unsorted file.




c. Sort the above data by sorting on the product Names. You may use either bubble sort or selection sort in ascending or descending order on product Names. The arguments of call function must include arrays of structure.




d. You may use C-String function Strcmp (,) to compare two product Names and use Strcpy (,) together to do swapping for sorting.




e. In the program algorithm, you must use “-” structure pointer operator.




f. Print out the sorted array: product Names, unit prices, quantities sold, and the sales of each product including the total units sold and the total sales at the bottom of the sorted data..




g. Turn in source programs, and the print out of first unsorted file and the sorted data from array. The file in (a) must be unsorted.




h. The file path in the desktop can be located by file property:




“C:\\Users\\yourUsersName\\Desktop\\filename.txt”




i. The following should apply to all assignments during the semester.

Turn in with hard copy and the program and the output must be professional and the turn in should include the source Program, and the displayed outputs as described above. Proper messages in the output are required to indicate the execution and different outputs. Turn in all assignments in class.

More products