Question: NEED help with the student.h and student.cpp for this project the main.cpp file is done do not need to change it. this program is in

NEED help with the student.h and student.cpp for this project the main.cpp file is done do not need to change it. this program is in c++.

NEED help with the student.h and student.cpp for this project the main.cpp

file is done do not need to change it. this program is

// Student.h

#pragma once #include

using namespace std;

class Student { public: Student(); // default constructor Student(const string &cwid); // constructor with parameter void addCourseGrade(const string &courseName, char grade); // add course name and grade to student's record double getGPA(); // calculate and return GPA void printTranscript(); // print transcript - see Student.cpp for the format string getCWID(); // return the CWID of this student private: // any private member variables and methods go here // TO BE COMPLETED

}; ==================================================================================================================== //student.cpp

#include "Student.h"

#include

Student::Student() { // TO BE COMPLETED

}

Student::Student(const string &cwid) { // TO BE COMPLETED

}

string Student::getCWID() { // TO BE COMPLETED }

void Student::addCourseGrade(const string &courseName, char grade) { // TO BE COMPLETED

}

double Student::getGPA() { // TO BE COMPLETED

}

// print transcript in this (sample) format: // TRANSCRIPT FOR CWID=279750343 // CS 121 C // CS 253 B // CS 131 B // GPA = 2.6667 void Student::printTranscript() { // TO BE COMPLETED

}

====================================================================================================== //main.cpp

////////////////////////////////////////////////////////////////////////////////////////////// // DO NOT EDIT THIS FILE (except for your own testing) // CODE WILL BE GRADED USING A MAIN FUNCTION SIMILAR TO THIS //////////////////////////////////////////////////////////////////////////////////////////////

#include #include #include #include

#include "Student.h"

using namespace std;

template bool testAnswer(const string &nameOfTest, const T &received, const T &expected);

template bool testAnswerEpsilon(const string &nameOfTest, const T &received, const T &expected);

int main() { { // test only the Student class Student student("123456789"); testAnswer("Student::getCWID test", student.getCWID(), string("123456789")); student.addCourseGrade("cs101", 'A'); testAnswerEpsilon("Student::getGPA test1", student.getGPA(), 4.0); student.addCourseGrade("cs201", 'C'); testAnswerEpsilon("Student::getGPA test2", student.getGPA(), 3.0); }

}

template bool testAnswer(const string &nameOfTest, const T &received, const T &expected) { if (received == expected) { cout

template bool testAnswerEpsilon(const string &nameOfTest, const T &received, const T &expected) { const double epsilon = 0.0001; if ((received - expected

Obiective The grades of all students are in a text file in the following format: CS121 CS121 CS121 CS121 CS253 CS253 CS253 CS131 CS131 CS131 267893043 A 454454651 B 279750343 C 546208080 C 454454651 B 279750343 B 546208080 656529993 D 546208080 B 279750343 B where column 1 is the course name, Column 2 is the student's CWID, and column 3 is the grade You are given partial implementations of two classes. Class student stores the course information for one student his/her list of courses and grades in each. A method in this class can then calculate the GPA. A Registrar object stores multiple students' information. It reads a text file (formatted as above) and populates objects of class Student each time a line is read You are to complete the implementations of these two classes, adding public/private member variables and functions as needed. Your code is tested in the provided main.cpp. Initially, the given code does not even compile. As you complete the code, it should pass the tests in the main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!