Scripting LanguageTU Board 2026
Difference between abstract class and interface. Write PHP code to create a parent class Book with properties title, author and price and a method displayBookDetails(). Also create two subclasses…
10Difference between abstract class and interface. Write PHP code to create a parent class Book with properties title, author and price and a method displayBookDetails(). Also create two subclasses TextBook and ReferenceBook that inherit from Book. Add property subject in TextBook and edition in ReferenceBook. Create methods to display complete details of each book. [3+7]
A worked answer is on its wayMeanwhile, read the Scripting Language notes for this topic.
Discussion
Loading…
More Scripting Language questions
Write the code to create and remove new list item into Unordered list dynamically into JavaScript DOM. [5]TU Board 20265What is Ajax? Write code to check if phone is available or not into signup form using Ajax? [1+4]TU Board 20265What is JS arrow function? Explain use of forEach() and map() method in JavaScript. [1+4]TU Board 20265What is session? Describe how can we relate session with cookie? [1+4]TU Board 20265What is CMS? Describe major features of CMS. [1+4]TU Board 20265Describe different types of arrays in PHP with proper example. [5]TU Board 20265