| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Class Student and CourseRegistration
1).Design a class Student.Each object represents information about a single student. Members should be included for identifier,name,address,credits hours completed and date of first enrollment.Methods should be included for initialization(constructors), assignment (overloaded"=" operator),and modifying field values,including a method to increment the number of credits.
2).Also design a class CourseRegistration.Each object represents the enrollment of a student in a course.Members should be included for a course identifier,student identifier,number of credit hours and course grades. 3).Create a list of students and course registration information. 4).Add methods to class Student to read student field values from an input stream and to write the fields of an object to an output stream nicely formatted.Also prompt a user to enter the field values.Use C++ stream operations to implement these methods. 5).Add methods to class CourseRegistration to read course registration field values from an input stream and to write the fields of an object to an output stream nicely formatted.Also prompt a user to enter the field values.Use C++ stream operations to implement these methods. Here are my code so far. Please help me. // Student.cpp #include <iostream> #include <fstream> #include <string> //#include "Date1.cpp" usingnamespace std; constint MAX_NUMBER_OF_STUDENTS = 10; class Student { private: longint Student_ID; string Student_Name[MAX_NUMBER_OF_STUDENTS]; string Student_Address[50]; longint EnrollmentDate; float CreditHoursCompleted; friend iostream; public: Student(); Student(const Student &student); Student & operator = (const Student&); void setID(longint student_id) {} void setName(string address[]) {} void setAddress(string name[]) {} void setEnrollDate(longint enroll_date) {} void updateCreditHours(float credit_hour) {} }; |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Class Student and CourseRegistration |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|