this c++ program is supposed to read in information about students from a file, calculate gpa and stuff and print it out, when i run the program i have all i get are weird outputs, help me figure this out plz
anyway heres the program
#include
#include
#include
using namespace std;
class Course{
char grade;
int hours;
public:
Course(){
name = "";
hours = 0;
}
Course(string n, char g, int h);
void setName(string n){name=n;}
void setGrade(char g){grade=g;}
void setHours(int h){hours=h;}
string getName(){return name;}
char getGrade(){return grade;}
int getHours(){return hours;}
void print(){
if (name != ""){
cout.width(10); cout<< name;
cout.width(4); cout << grade;
cout.width(4); cout << hours << endl;
}
else
cout << "....." << endl;
}
};
class Student{
string last,first,street,city,state,z...
int id;
int num_classes;
Course classes[15];
2007-04-23
19:17:53
·
3 answers
·
asked by
Alex P
2
in
Programming & Design