We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 13: Abstract Classes
Day 13: Abstract Classes
Sort by
recency
|
589 Discussions
|
Please Login in order to post a comment
Just MyBook class Python implementation code:
javascript
Pretty easy challange *My code: *
python solution :
class MyBook(Book): def init(self, title, author, price): super().init(title, author) self.price = price def display(self): print(f"Title: {self.title}\nAuthor: {self.author}\nPrice: {self.price}")
import java.util.*;
abstract class Book { String title; String author;
}
class MyBook extends Book{ int price; MyBook(String title, String author,int price){ super(title,author); this.price=price;
}
public class Solution {
}