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++.
// 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 "Student.h"
using namespace std;
template
template
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 template
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started