Question
my program isn't running; please help identify errors : file:main.cpp #include stdafx.h #include #include studentType.h using std::cout; using std::endl; void testStudentType() { { cout <
my program isn't running; please help identify errors :
file:main.cpp
#include "stdafx.h"
#include
#include "studentType.h"
using std::cout;
using std::endl;
void testStudentType()
{
{
cout << "Enter a student's first name:";
cin >> fName;
cout << "Enter a student's last name:";
cin >> lName;
cout << "Enter a student's test score:";
cin >> tScore;
cout << "Enter a student's programing score:";
cin >> pScore;
cout << "Enter a students gpa:";
cin >> gpa;
studentType st(fName, lName, tScore, Pscore, gpa);
int main()
{
testStudentType();
system("pause");
return 0;
}
file studentType.cpp
#include "stdafx.h"
#include "studentType.h"
studentType::studentType(string newFirstName, stringnewLastName, int newTestScore, int newProgrammingScore, double newGPA)
{
}
string studentType::getFirstName()
{
return firstName;
}
string studentType::getLastName()
{
return lastName;
}
char studentType::getGrade()
{
return Grade;
}
int studentType::getTestScore()
{
return testScore;
}
int studentType::getProgrammingScore()
{
return programmingScore;
}
double studentType::getGPA()
{
return gpa;
}
void studentType::setFirstName(string newFirstName)
{
firstName = newFirstName;
}
void studentType::setLastName(string newLastName)
{
lastname = newLastName;
}
void studentType::setTestScore(int newTestScore)
{
testScore = newTestScore;
}
void studentType::setProgrammingScore(int newProgrammingScore)
{
programmingScore = newProgrammingScore;
}
void studentType::setGPA(double newGPA)
{
gpa = newGPA;
}
file : studentType.h
#pragma once
#include
using std::string;
class studentType
{
private:
string firstName;
string lastName;
char Grade;
int testScore;
int programmingScore;
double GPA;
public:
studentType(string = "", string = "", int = 0, int = 0, double = 0.0);
string getFirstName();
string getLastName
char getGrade();
int getTestScore();
int getProgrammingScore();
double getGPA();
void setFirstName(string);
void setLastName(string);
void setTestScore(int);
void setProgrammingScore(int);
void setGPA(double);
};
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