Answered You can hire a professional tutor to get the answer.

QUESTION

// // // // // // // CS 215 Intermediate C++ Programming - Unit 2 - Individual Project 1 Class Session/Section: 1703A-02 Unit 1: Input/Output...

Need some C++ coding guidance.  My assignment is to code a C++ program to read True/False (TF) and Multiple Choice (MC) questions from a text file I created (inputQA), load the questions into an array.  When the program runs it is supposed to show each question and the user inputs their answer.  After the three questions, it should end and display total points.  

Problem....    My compile/build seems to be fine as I do not get any errors. I don't see any errors on my inputQA.txt file.   However, after the third and last question it seems to loop on the last question after it is answered correctly and then states "Question 1" but prints question 3 again....every time....  It is like I am missing something before EOF for the inFile.  Also, is there a cleaner way of accomplishing this?    I followed a UML diagram that was actually wrong, and this ended up frustrating me.   I want to understand it better and believe I made the code harder than it needed to be.   At best, can please help guide me to fix this so that it does EOF and completes the code, displaying the total.

Attached is the .cpp file and .txt file

  • Attachment 1
  • Attachment 2
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question