SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 26 Mar 2018 My Price 10.00

Declare an array. to call a 2D array element,

I need help with the rest of this code. I know strings and arrays are involved in this code. The HW6 attached explains what needs to be done. The output needs to look like the second page of the HW6. The answers and tests documents attached are used toward the output. It would be much appreciated. Thank you. Using Visual Studio 2017 or 2015. C++.

 

 

#include <fstream>

#include <iostream>

#include <iomanip>

#include <string>

using namespace std;

 

void main()

{

int numstudents = 0, numcorrect, i, chart[20][5] = { 0 };

 

ifstream finkey, finstud;

finkey.open("Answers.dat");

finstud.open("Tests.dat");

ofstream fout;

fout.open("Output.dat");

string key, id, responses;

finkey >> key;

finstud >> id >> responses;

fout << "Student-ID" << setw(50) << "Number Correct" << endl;

while (!finstud.eof())

{

numstudents++;

numcorrect = 0;

for (i = 0; i < 20; i++)

if (key[i] == responses[i])

numcorrect++;

fout << id << numcorrect << endl;

finstud >> id >> responses;

}  

fout << endl;

fout << "Number of students taking exam = " << numstudents << endl;

 

/*we have done the first 2 things asked. Next is the distribution chart

 

/*The new thing is 2D arrays. Declare an array. to call a 2D array element, use the same notation - chart[0][0] is the first element. 

If we didn't want to zero out the chart on the declaration statement, could we do this elsewhere in our code? How? 

  YES!! A nested loop!! We will need the nested loops for HW6, and not just to zero out*/

 

/*You need to tally eveything before outputting it. You can build the chart as you read it. 

Rows= the number of the question shifted by one and Columns= the letter's place in the alphabet. 

Somewhere in the while loop, bump the appropriate chart box. When you print out the actual chart, you can use a nested loop*/

 

system("pause");

}CBEDBEBAECDDAEEBDEDE

430-52-6192 CBADEEAAECADBEEBAECE

112-81-5225 CBEDBEBAECDDDEEBDEDE

120-49-5322 CDEDBAABECCDAAEBADDE

456-65-3211 AACCEEDDEEAEDBADEAEA

990-45-0978 AABDEDEAEDBCEEBEACEC

324-98-5445 DDEAACEDACDEEEACEDDE

112-34-3443 CDEDBAABECCDAAEBADDE

435-56-8790 CBEDBBBAECDDAEECDEDE

452-23-5675 DEDDDDEAEEACBDEEEEEE

776-45-5454 EEEEEEEEEEEEEEEEEEEE

567-71-9909 ABCDEDEACEBBAEDDEEEA

345-54-7834 CDECDEEEDCDADEEEAADE

555-12-2341 CDEDBABAECDDAEEBDEDE

568-09-0096 CBEDBEBAECDDAEEBDEDE

664-61-0987 CDEDBAEEACDBEAEDBEDE

612-45-7687 AABCDEBBEDACBEAEBDEE

567-23-1125 DEDEEEAABBCCDDEEABED

561-43-6781 CDEDEADEDDDEDABCCEEE

498-12-4321 AABBCCDDEEAABBCCDDEE

479-01-4867 BEEEACDEAECEACEABCEE

489-90-0999 CBEEEEBAECDDAEEBDEEE

456-09-1111 CBEDBEBAECDDAEEBDADE

 

561-66-6657 CCAADEABBEAEDCBEEABE

 

 

 

Attachments:

Answers

(5)
Status NEW Posted 26 Mar 2018 01:03 PM My Price 10.00

  ----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------  ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)