Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with getting the correct code. i have been working on this assignment for 4 days now. my code is posted in the

I need help with getting the correct code. i have been working on this assignment for 4 days now. my code is posted in the pictures, but only coming out to 80% in the grade. C++ PLEASE HELP ME!
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
TFFTFFTTTTFFTFTFTFTT Every other entry in the file is the student ID. followed by a blank, followed by the student's responses. For example, the entry: ABC54301 TFTFTFTT TFTFTFFTTFT indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False. and so on. This student did not answer question 9 (note the empty space). indicates that the student ID is ABC54301 and the answer to question 1 is True, the answer to question 2 is False, and so on. This student did not answer question 9 (note the empty space). The exam has 20 questions, and the class has more than 150 students. Each correct answer is awarded two points, each wrong answer gets one point deducted, and no answer gets zero points. Write a program that processes the test data. The output should be the student's ID. followed by the answers. followed by the test score. followed by the test grade. An example of the program is shown below: Processing Data Key: TTFTFTTTFTFTFFTTFTTF ABC54102 T FTFTFTTTFTTFTF TF 27 D 2 \#includesfstream> \#define M 4// maximum number of students using namespace std; int main(){ string * studentID; I/ array of pointers to c-strings string *studentResult; I/ array of pointers to c-strings. string temp: //temporary variable 2 string Result; //string to hold correct result int index; double score =0.0; double scale=0,0; char grade; int N=0; l/maximum number of questions coutce"Enter number of exa questions: "; cins?N: ifstream fin: fin.open ("Ch12 Ex20ata,txt"); if (fin.flopen()){ int 1=2; motlinatfin Poemtir): 65elseelsecoutrr}coutrre}olse{coutcr"Ut Run crlagke 0Search0sut

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

=+Where does the focus of labor relations lie? Is it collective

Answered: 1 week ago