
Understanding Multiple Inheritance in Object-Oriented Programming
Explore the concept of multiple inheritance through the example of LeBron James, identifying how he fits into the hierarchy of being both a basketball player and a man. Learn how to implement multiple inheritance by establishing signatures and facts to assert and check relationships within the class structure.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Multiple Inheritance Roger L. Costello March 24, 2018
Fun facts Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man.
Fun facts person Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man. basketball player
Fun facts person Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man. basketball player man
Fun facts person Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man. LeBron James basketball player man
Fun facts person Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man. LeBron James basketball player man
Fun facts person Each basketball player is a person. Each man is a person. LeBron James is a basketball player. LeBron James is a man. man basketball player LeBron James multiple inheritance
sig person {} sig basketball_player in person {} sig man in person {} person man basketball player onesig LeBron_James in basketball_player {} LeBron James fact {LeBron_James in man} To implement multiple inheritance, supplement a subset signature with a fact.
sig person {} sig basketball_player in person {} sig man in person {} onesig LeBron_James in basketball_player {} fact {LeBron_James in man} assert LeBron_James_is_a_basketball_player_and_a_man { (LeBron_James in basketball_player) and (LeBron_James in man) } check LeBron_James_is_a_basketball_player_and_a_man No counterexamples found.