Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I need help with this assignment. It is one assignment. I have to \"ident

ID: 3628138 • Letter: H

Question

Hello,
I need help with this assignment. It is one assignment.

I have to "identify the errors in the code".


-Class Hello
Function Hi() As String
Return “hi!”
End Function
End Class

Class Greetings
Inherits Hi()
Function Goodbye() As String
Return “goodbye”
End Function
End Class


This is the other code:
Class Hello
Function Hi() As String
Return “hi!”
End Function
End Class

Class WithIt
Inherits Hello
Overrides Function Hi() As String
Return “Hey”
End Function
End Class


Thank you. All I need is the answer.

Explanation / Answer

On the first two classes: Class greetings inherits a method(function), it should inherit a class to call its inner methods. (A class can only inherit a class, its called the super-class) On the last classes: When class Withtl inherits a method of class Hello, the result should be the same, that means it should return "hi!".

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote