Guest User

Untitled

a guest
Dec 14th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <fstream>
  2. #include <iostream>
  3. #include <iomanip>
  4. using namespace std;
  5. const int SIZE=30;
  6. class Student{
  7. public:
  8. void ReadFromFile(ifstream& fin);
  9. string GetName();
  10. void Output();
  11. private:
  12. string student_name;
  13. int student_number;
  14. float student_grade;
  15. };
  16.  
  17. class Course{
  18. public:
  19. void ReadFromFile(ifstream& fin); //Always pass IF or OFstream by reference
  20. void SortByName();
  21. void Output();
  22. int FindSmallest(int start);
  23. private: string course_name;
  24. Student students[SIZE]; //Use for loop to fill array
  25. };
Add Comment
Please, Sign In to add comment