Need help with school assignment due soon

I need help with this assignment. the assignment details are Create no separate directory for the solution. Use parallel arrays for four inventory values used to process purchases.
variables are
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>

using namespace std;
int main()
{
// parallel array items loaded from inventory file
string itemCode[20];
double itemPrice[20];
long itemOnHand[20];
string itemName[20];

int itemCount = 0;
int purchaseCount = 0;
int pos;
const float MARKUP_RATE = 0.18;
// fields loaded from purchases input file
string purchaseNum;
string purchaseItem;
long purchaseQty;

ifstream inventoryFile;
ifstream purchaseFile;
ofstream inventoryUpdate;

some details for my assignment is i have to use a for loop to modify each value in the itemPrice[] array, increasing the price value by the markupRate.
Read the first purchase record into three variables. continue to process each record until end-of-file. use the input purchaseItem value to look up an item in the itemCode[] array. When a match is found, use the pos variable to identify the same position in the parallel arrays. Select the itemPrice[] value, multiply by the purchaseQty amount and store the result in a purchase total variable. Decrease itemOnHand[] quantity by the number of items purchased (purchaseQty). Display values shown (including itemName[]) at the console. Set options for numeric values sent to cout to enhance display of floating-point(dollar amount) quantities and use setw(n) in the output stream to position numeric values across the line:
cout << fixed << setprecision(2);
close the Purchases file and display the number of purchase records processed.

then open an output file InventorUpdate.txt and use a for loop to write the current updated items in the Inventory parallel arrays to this file. Space between the items written to a record by writing tab literals '\t directly to the output file stream. Set values for output file stream to store numeric values in a suitable format:
inventoryUpdate << fixed << setprecision(2);

the resulting output file (inventoryUpdate.txt) will be written as an updated inventory file. close the output file.

This output file reflects the increased prices resulting from an 18% increase for standard markup and the remaining quantities on hand in the inventory after purchases have been processed. Embedded (literal) tab characters provide spacing between fields in the output stream for inventory items written within the loop:
inventoryUpdate << itemCode[pos] << '\t << itemPrice[pos] << itemOnHand[pos] << itemName[pos] << endl;

}

Please help me I have no idea on how to finish this school project.
Last edited on
Please help me I have no idea on how to finish this school project.

Starting it would get you one step closer.
Topic archived. No new replies allowed.