Thursday, November 6, 2008

GradeBook Assign

Notes:
1. Files you need to create: GradeBook.h (where the function prototype are listed), GradeBook.cpp(the implementation of the functions) and Main.cpp (the main file)
2. If scanning for input grade using cin does not work, try
grade = cin.get();
3. 6 functions are included in the class:
  • GradeBook(string input);
  • void displayMessage();
  • void setValue(string input);
  • string getValue();
  • void setGrades();
  • void displayGrades();
4. 7 private variables:
  • string courseName;
  • int aCount;
  • int bCount;
  • int cCount;
  • int dCount;
  • int eCount;
  • int fCount;
5. If including the header file of GradeBook.h in main.cpp creates a linker error, replace it with GradeBook.cpp (assuming that you saved the functions' implementation file as GradeBook.cpp)

Output sample:

No comments: