Question: 3. Implement the class diagram in C++. Separate the class definition from the class declaration within the same file. Accomplish the following tasks in your

 3. Implement the class diagram in C++. Separate the class definitionfrom the class declaration within the same file. Accomplish the following tasksin your program. Write your code in the provided codebase program. Notethat, some of the code has been given in the codebase program.3. Implement the class diagram in C++. Separate the class definition from

3. Implement the class diagram in C++. Separate the class definition from the class declaration within the same file. Accomplish the following tasks in your program. Write your code in the provided codebase program. Note that, some of the code has been given in the codebase program.

3. Implement the class diagram in C++. Separate the class definition from the class declaration within the same file. Accomplish the following tasks in your program. Write your code in the provided codebase program. Note that, some of the code has been given in the codebase program. a. Complete the declaration of all classes. (12 marks) b. Define all the methods of the class Student. ( 6 marks) c. Define all the methods of the class Mentee. ( 5 marks) d. Define all the methods of the class Mentor. (13 marks) e. In the main function, declare two arrays below: an array of mentees an array of mentors and initialize the arrays with the sample data given in Table 1 and Table 2. (5 marks) Table 1: Sample data for mentee students No Mentee's name Email Phone 1 Abdul Samad asamad892@gmail.com 013-89001000 2 Siti Nurdiana ct.nur@yahoo.com 011-123013456 Level 2 2 Table 2: Sample data for mentor students Mentor's name Expertise 1 Ahmad Kamal Web Programming 2 Siti Aminah Java and C++ No f. Declare another array to hold a list of students and fill in the array with all the mentees and mentors created in 3(e). (3 marks) g. Using a loop, print the list created in 3(f). The output should look like as in Figure 2. (2 marks) h. Using the array created in 3(e), assign the second mentee to the second mentor. (1 mark) i. Using a loop and the array created in 3(e), print the list of mentors and their mentee. Print only the names. See Figure 2 for the expected output. (3 marks) Student name Studentin) getName setName(n) displayinfo) Abbreviations: name 1: level email P: phone x: expertise mentee Mentee Mentor level expertise Menteen, e. p. 1) displayinfo Mentorn, x) displayinfo) assignmentee(m) getMenteel) Contact email phone Contact(e,p) displayinfo getEmail setEmail(e) getPhone setPhone(p) Figure 1: Class diagram Table 3: Description of the members of each class. Class Members Description class Student name Student's name. Student () A constructor. getName() and Accessor and mutator methods. setName() displayInfo() class Mentee level displays the student's information The class attribute indicating the level of progress for each mentee. There are five levels, from 1 to 5, where level 5 indicates mastery level. Mentee () A constructor displayInfo() displays the mentee's information including name, email, phone and level, class Mentor expertise The mentor's area of expertise that he or she can be coaching, e.g., "CH Programming", "Game Programming", etc. Mentor() displayInfo() assignMentee () getMentee () A constructor. displays the mentor's information. assigns a mentee to the mentor. returns the mentee's name of the mentor. However, if the mentor has not been assigned to any mentee, this method will retum an empty string. classs attributes. A constructor class Contact email, phone Contact() getEmail(), setEmail(), getPhone () and setPhone () Accessor and mutator methods. displayInfo() displays the contact information The list of students Student #1 Mentee's Name : Abdul Samad Mentee's Email : as amad92@gmail.com Mentee's Phone : 013-89001000 Mentee' Level : 2 Student 2 This student is a mentor Name Espertise : Web Programming Information about the mentee under him/her: Mentee'. Name : Abdul Samad Mentee's Email : as amad920gmail.com Mentee's Phone : 012-89001000 Mentee's Lerrel : 2 Output of question 365 Student #a Mentee's Name : Siti Nurdiana Mentee'. Email : ct.nur@yahoo.com Mentee's Phone : 011-123013456 Mentee's Lerrel : 1 Student : This student is a mentor Name : Siti Aminah Espertise : Java and C+- ** No mentee yet ** Mentor Mensee Ahmad Kamal Siti Amanah Abdul Samad Siti Nurdiana } Output of question 30) Figure 2: Program output

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!