Question: Create a c++ program using classes and arrays. use the following student file information. Create a c++ program using class and arrayws. use the following

 Create a c++ program using classes and arrays. use the following

Create a c++ program using classes and arrays.

use the following student file information.

Create a c++ program using class and arrayws.

use the following student file information.

/*student.h*/ #ifndef STUDENT_H #define STUDENT_H #include using namespace std; class Student { private: int id, telephoneAreaCode; string firstName, lastName, dateOfBirth, address, telephoneNumber; public: //Return id number of student int getId() const; //Modify student id void setId(int id); //Return first name of student string getFirstName() const; //Modify first name of student void setFirstName(const string fname); //Return last name of student string getLastName() const; //Modify last name of student void setLastName(const string lname); //Return full name string getFullName() const; //Return date of birth string getDateOfBrith() const; //Modify date of birth void setDateOfBirth(const string dob); //Return the address string getAddress() const; //Modify the address void setAddress(const string add); //Return telephone number string getTelephoneNumber() const; //Modify telephone number void setTelephoneNumber(const int areaCode, const string num); //Return true if two students have same last name otherwise false bool checkLastName(const Student &s) const; //Return true if two students are roommates bool checkRoommate(const Student &s) const; }; #endif /*student.cpp*/ #include "student.h" using namespace std; //Return id number of student int Student::getId() const { return id; } //Modify student id void Student::setId(int id) { this->id = id; } //Return first name of student string Student::getFirstName() const { return firstName; } //Modify first name of student void Student::setFirstName(const string fname) { firstName = fname; } //Return last name of student string Student::getLastName() const { return lastName; } //Modify last name of student void Student::setLastName(const string lname) { lastName = lname; } //Return full name string Student::getFullName() const { return firstName + " " + lastName; } //Return date of birth string Student::getDateOfBrith() const { return dateOfBirth; } //Modify date of birth void Student::setDateOfBirth(const string dob) { dateOfBirth = dob; } //Return the address string Student::getAddress() const { return address; } //Modify the address void Student::setAddress(const string add) { address = add; } //Return telephone number string Student::getTelephoneNumber() const { return to_string(telephoneAreaCode) + "-" + telephoneNumber; } //Modify telephone number void Student::setTelephoneNumber(const int areaCode, const string num) { telephoneAreaCode = areaCode; telephoneNumber = num; } //Return true if two students have same last name otherwise false bool Student::checkLastName(const Student &s) const { return (this->lastName == s.lastName); } //Return true if two students are roommates bool Student::checkRoommate(const Student &s) const { return (this->address == s.address); } /*teststudent.cpp*/ #include #include "student.h" using namespace std; int main() { Student s1, s2; int temp1; string temp2; /*Enter info of student 1*/ cout>temp1; cin.ignore(256, ' '); s1.setId(temp1); cout>temp2; s1.setFirstName(temp2); cout>temp2; s1.setLastName(temp2); cout>temp1; cout>temp2; s1.setTelephoneNumber(temp1, temp2); /*Enter info of student 2*/ cout>temp1; cin.ignore(256, ' '); s2.setId(temp1); cout>temp2; s2.setFirstName(temp2); cout>temp2; s2.setLastName(temp2); cout>temp1; cout>temp2; s2.setTelephoneNumber(temp1, temp2); /*Printing student 1 info*/ cout  4. (25 marks) We want to create a class called Course, which represents the course offered at ECE. A course is defined with the following attributes: code (string), name (string), description (string), and a list of students registered in the course (array of type Student from previous question). You can assume that a course cannot have more than 20 registered students. The member functions of the class Course must perform the following operations: Return the course code Return the course name . Modify the course name Return the course description . Modify the course description Add a student to the course . Remove student from a course . Search if a student with a certain id number is registered in the course . Output list of student . Output the number of registered students Test your class by prompting the user to enter information about one course and four students. Create the course object four objects of the class Students. Register the students in the course. Test the member functions of the class. Deliverables: A file called student.h that contains the specification of the class. A file called student.cpp that contains the implementation of the member functions of the class. A file called course.h that contains the specification of the class. . . .A file called course.cpp that contains the implementation of the member functions of the class. . A file called testcourse.cpp that contains the main function.  4. (25 marks) We want to create a class called Course, which represents the course offered at ECE. A course is defined with the following attributes: code (string), name (string), description (string), and a list of students registered in the course (array of type Student from previous question). You can assume that a course cannot have more than 20 registered students. The member functions of the class Course must perform the following operations: Return the course code Return the course name . Modify the course name Return the course description . Modify the course description Add a student to the course . Remove student from a course . Search if a student with a certain id number is registered in the course . Output list of student . Output the number of registered students Test your class by prompting the user to enter information about one course and four students. Create the course object four objects of the class Students. Register the students in the course. Test the member functions of the class. Deliverables: A file called student.h that contains the specification of the class. A file called student.cpp that contains the implementation of the member functions of the class. A file called course.h that contains the specification of the class. . . .A file called course.cpp that contains the implementation of the member functions of the class. . A file called testcourse.cpp that contains the main function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!