Question: 10-1 C++ What more do you need? Instructions Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class

10-1 C++ What more do you need?

Instructions

Chapter 9 defined the struct studentType to implement the basic properties of a student. Define the class studentType with the same components as the struct studentType, and add member functions to manipulate the data members. (Note that the data members of the class studentType must be private.)

Write a program to illustrate how to use the class studentType.

STRUCT studentType:

struct studentType

{

string firstName;

string lastName;

char courseGrade;

int testScore;

int programmingScore;

double GPA;

};

Must be separated into 3 files:

Main.cpp

studentType.h

studentTypeImp.cpp

Test Contents:

TEST(Grades, 1) {
 testing::internal::CaptureStdout();
 studentType student;
 studentType newStudent("Brain", "Johnson", '*', 85, 95, 3.89);
 
 student.print();
 cout << "***************" << endl << endl;
 
 newStudent.print();
 cout << "***************" << endl << endl;
 std::string output = testing::internal::GetCapturedStdout();
 ASSERT_EQ(output, "Name: Grade: F Test score: 0 Programming score: 0 GPA: 0 *************** Name: Brain Johnson Grade: A Test score: 85 Programming score: 95 GPA: 3.89 *************** ");
}

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!