This C++ program is giving me trouble SUMMARY n this project, you are asked to d
ID: 3818155 • Letter: T
Question
This C++ program is giving me trouble
SUMMARY n this project, you are asked to design, develop, implement, and test aprototype (a model) for an exam software system. This exam is administered to students graduating with a degree in Social Science who would like to enter the Graduate Program. The students must pass this exam to be admitted into the Graduate Program. The basic requirements for such a system include the following: I. Student Registration: Students taking the exam are eatered into the grading system via an input file. The file contains the students' names. IDnumbers, and answers to a multiple choice exam Grading The user enters an "Answer Key" and then the system grades the students' answers and calculates the student total points, average, and letter grade earned (you are not required perform data validation 3. Grade Reporting: The system generates a report (in ascending order of each studen ID number, exam answers, total points, average and letter grade earned; 4. Analysis Reporting: The system produces three reports (in ascending order that include the names and graded results of the students who made an A, B, or C full adhnission into the program, the names and graded results of the students who made a D (conditional adnission into the program), and the names and graded results of the students who failed F not admitted to the program) Detailed Specification: The system will read the students' ID number (an integer a full name (name will be the format last naane, first name), and the students' 10 multiple choice answers from an input file provided. Allow the program to read the information from the file for up to 50 students. This information will be displayed the Grading Report as illustrated in the Sample Input/ouput section The exam consists of 10 multiple-choice questions. The answer key is entered by the user. Valid choices for each of the exam questions are AaB C or D The grading rules are specified as follows: Each correct answer counts 5 points in raw score. The is the quoti ient between the total raw score received and the maximum possible. Tae is converted to a letter grade: A 90% above), B (80-89% C (70-79%), D (60-69 and P (59% below The students' answers, total points eamed, average, and letter grade are displayed in the Grading Report as illustrated in the Sample InputOutput section The Grade Report will be sorted in ascending order by name, displaying all the students' information. (See the sample Grading Report in the Sample section Three separate reports will be produced, sorted in ascending order by name, and grouped in the following categories: a) Admitted into the Graduate Program (students who eamed anA, B, or 9: Conditional Admission (students who eamed a D) Admission Denied (students eaned an F (See the sample Grading Report in the Sample Input ou put section.) Solution Design Function decomposition: accomplish each specified task with well designed modular functions. (You receive a zero for your grade if you do not use functions.) Solution integration: integrate the modules into a prototype (a working model, you will receive azero for your grade ifthe code does not run) for an exam software system All coding standards should be followed. You are not required to perfomt data validation or has the program repeatablel Sample input/output Enter the answer key Answer 132A Answer 2 Answer 3RD Answer 4 Answer 5: A Answer 6: C Answer 7 Answer 8 Answer 9 A Answer 10 ade Report Student ID Student etter Grade Answers otal Pt Average 878 Adams, Jerry A CDC ABD BCA 45.0 ABD CA C, DBCA 45.0 90.0 Dunn, Bob A CD CA CD BCA 50.0 100.0 all, B CD ABCD BCA 40.0 80.0 Natha A CBA BDD BCA 30.0 60.0 A CD CA CD BCA 50.0 100.0 Paul and, Ch 333 C D BCAB DBA A 25.0 50.0 998 Miles, Sue A CDB BBD BCA. 35.0 70.0 Rowe, Steve A CD CA ADBC 45.0 A CDB ACD BCA h, Mary 45.0 90.0 Students Admitted to the Graduate Program: Student ID Student Name ade otal Average Adam 878 45.0 erry 45.0 90.0 Dunn, Bob Hall, B 40.0 Pa 20 100.0 998 es, Sue 35.0 70.0 Rowe, Steve 45.0 90.0 h, Mary 45.0Explanation / Answer
#include <iostream>
#include <vector>
utilizing namespace sexually transmitted disease;
layout <class T>
class Stack{
private:
vector<T> information;
open:
bool Empty();/checks if stack is vacant
void Push(T thing);/adds thing to stack
T Top();/returns thing at top of stack
void Pop();/expels thing at top of stack
companion ostream& operator<<(ostream&out, const Stack &s);/over-burden yield administrator
};
#include <iostream>
#include <vector>
#include "Stack.h"
utilizing namespace sexually transmitted disease;
layout <class T>
bool Stack<T>::Empty()/checks if stack is vacant
{
return data.empty();
}
layout <class T>
void Stack<T>::Push(T thing)/adds thing to stack
{
data.push_back(item);
}
layout <class T>
T Stack<T>::Top()/returns thing at top of stack
{
if(data.back()>-1)
return data.back();
else
cerr<<"Stack is empty ";
}
layout <class T>
void Stack<T>::Pop()/expels thing at top of stack
{
data.pop_back();
}
format <class T>
ostream and operator<<(ostream&out, const Stack<T> &s)/over-burden yield administrator
{
while(!s.Empty())
{
out<<s.Top();
s.Pop();
}return out;
}
#include <iostream>
#include <vector>
#include <string>
#include "Stack.h"
#include <fstream>
utilizing namespace sexually transmitted disease;
int principle()
{
ifstream inFile;
ofstream outFile;
inFile.open("palindrome.txt");
outFile.open("outfile.txt");
Stack<string> s;
string holdPalindrome="";
/I know the accompanying isn't generally right however I halted here
while(inFile)
{
holdPalindrome.append(s.Top());
outFile<<holdPalindrome<<endl;
}
inFile.close();
outFile.close();
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.