Programming Project 4 Solution

$30.00

Description

: Pointer Variable & Dynamic Allocation

Reference: Programs 9.14,and 9.15; sections 9.8 and 9.9

a. You must use the pointer variable and dynamic allocation for this programing project.

b. Create a file of 10+ products including product ID’s, unit prices, and quantities sold.

c. Create three or more arrays for the product information. Arrays must be dynamically allocated before you put data file into the arrays and with proper message..

d. Calculate the sales of each product in a function.

e. Print out product ID’s, unit prices, quantities sold, and the

sales of each product from the arrays in the main() function…

f. Also print out the total units sold, the total sales of all items.

g. Turn in source programs, and output that should include but not

limited to: original data (3 arrays), and sales array, and the total sales and total units sold.

h. 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 is required to indicate the execution and different outputs. Turn in all assignments in class. It will have late penalty 10% if your turn in 30 minutes after the beginning of class up to next class..

i. Hint: Use program 9.14.


error: Content is protected !!