Student inherits Person. Student has a public method getGPA(). Person does not have a getGPA() method. What access does
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Student inherits Person. Student has a public method getGPA(). Person does not have a getGPA() method. What access does
Student inherits Person. Student has a public method getGPA(). Person does not have a getGPA() method. What access does Person have to the getGPA() method that is in Student? (Select all that apply) getGPA() is public, thus Person has direct access only if it specifies it by saying Person.getGPA(). Even though getGPA() is public, Person has NO access because Student inherits Person, but Person does not inherit Student. getGPA() is public, thus Person has direct access Student objects or methods in the Student class can call the getGPA() method directly
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!