My teacher is asking this of me, and I am just not following how to do this. All distance learning and not a lot of assistance. any help would be amazing. "For this assignment, you will create a program that records information for a book sale. You will use parallel arrays to record each book that will be sold in the sale. You will need to record each book's title, author, and price in three parallel arrays. Your program will then output a list of all of the books that will be sold, with column headers that are separated by 10 spaces. Your program will also separately output the total sales that will be generated if all of the books are sold at the listed price.

Here is how grading will work for this second assignment. If your score on the second Chapter 6 assignment is 90% or greater, I will ignore your score on the first assignment for Chapter 6 and make the grade of the second assignment your official Chapter 6 assignment grade. However, if your score is less than 90%, both your first score and your second score will be averaged into your grade. Finally, if you fail to turn in the second assignment, I will invalidate your first assignment score and you will receive a grade of zero for both attempts. "

Setting aside the questionable wisdom of this design approach, the question becomes, what have you done with it so far? As stated in the DaniWeb community rules, we will only help you if you first demonstrate some effort on your own part. Post some code, or a specific question, and we can do something for you, but we cannot and will not solve the assignment outright.

Edited 3 Years Ago by Schol-R-LEA

Not a problem, I completly understand. I will submit on here this evening what I have completed as soon as I finish my other class work thanks for the fast response!

Not sure how exactly to start this one, but here is one from last week. for a program for people to add item name cost and ect.

        Num loopVar = 0  // Loop control variable
        String itemName[1000]  // Array for the item name
        num itemCost[1000]   // Array for the item cost
    Output “Welcome.  Enter 1000 items.”  // Welcome the user
    inputItems()     // Call the inputItems module
    outputItems()  // Call the outputItems module
    sayGoodbye()  // Call the sayGoodbye module
inputItems()  // Input 1000 item names and item costs
    for loopVar = 0 to 999 Step 1
input “Enter an item name: “, itemName[loopVar]
input “Enter the item cost: “, itemCost[loopVar]
outputItems()  // Output the results
Output “Item Name           Item Cost           Item Price”
for loopVar = 0 to 999 Step 1
    output itemName[loopVar] + “          “ + itemCost[loopVar] + “          “ + (itemCost[loopVar * 1.3)
sayGoodbye()  // End of program closing message
    Output “Thank you for entering 1000 items.  Goodbye.”

Just having a brain fart or something..

Here's a start. I suggest you add the headers and using declarations that are needed, get it running, and then move on to the next step - outputting a list of them.

int main()
  string titleArray[10];
  string authorArray[10];
  double priceArray[10];

  for (int i=0; i<10; ++i)
    cout << "Title of book " << i <<"?";
    cin >> titleArray[i];
    cout << "Author of book " << i <<"?";
    cin >> authorArray[i];
    cout << "Price of book " << i <<"?";
    cin >> priceArray[i];
  return 0;

I was way ahead of the curve when it comes to the Facebook; I didn't get one even back when it was called The Facebook :)

All questions here, please.

Any way you would be willing to help me expand on this a bit further. The solution I mean. I know how to do the declarations and initiate the program, but not after what you sugested.

This question has already been answered. Start a new discussion instead.