Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Problem a. Create a text file of 15+ products including product Names, unit prices, quantities sold, and sales of each product in your computer

C++ Problem

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. The file path in the desktop can be located by file property: C:\\Users\\yourUsersName\\Desktop\\filename.txt

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago