Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question [100 Marks A school is currently running a mentoring programme for its students. The students are divided into two groups, mentors and mentees. Mentors
Question [100 Marks A school is currently running a mentoring programme for its students. The students are divided into two groups, mentors and mentees. Mentors are more knowledgeable students and offer helps to mentees. They are chosen from those students with good CPAs. The programme offers two types of mentoring: Coaching-based mentoring: mentors will coach their mentees in particular areas, e.g., "C# programming", "Game Programming", etc. Therefore, a mentor must be expert in that area. Support-based mentoring: mentors offer their supports to the mentees without having to meet face to face. Thus, the mentor need to provide their phone numbers. Further, each mentee is assigned with only one mentor. Mentee's progress are kept track based on their levels, i.e. from level 1 to 5 where 5 indicates a mastery level. Given a class diagram that models the above problem in Figure 1 and the details about the class diagram in Table 2. Answer the questions 1 to 3 below. Note: As for questions 1 and 2, write your answers on papers, and for question 3, write your program using any CHIDE such as DevCpp. Use the codebase program provided, main.cpp. 1. Determine whether the following classes form any relationship to cach other in the context of Object-Oriented Programming (OOP). If so, name the type of relationship, otherwise write No Relationship. a. Coach and Support b. Mentee and Student c. Mentee and Mentor d. Coach and Mentor e. Coach and Student f. Coach and Mentee (12 marks) 2. The problem given above involves several OOP concepts including inheritance and polymorphism. a. Explain TWO (2) main roles of the inheritance concept in the above problem. Indicate in which part of the class diagram these roles take place. (16 marks) b. Explain how the concept of polymorphism plays its role in the above problem. (10 marks) c. Identify TWO (2) methods that will be specified as polymorphic. Justify your answer. Finaly, explain how you are going to make these methods polymorphic. (12 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started