Problem 13
What message does Java give when you put an abstract method inside a class which is not, in it- self, declared abstract?
Problem 14
Why an abstract method cannot be defined as final? Justify with example.
Problem 16
Imagine a publishing company that markets both book and audiocassette versions of its works. Create a class publication that stores the title (a string) and price (type fl oat) of publication. From this class, derive two classes: book, which adds a page count (type int), and tape, which adds a playing time in minutes (type fl oat). Each of these three classes should have a getdata() function to get its data from the user as the keyboard, and a putdata() function to display its data. Write a main() program to test the book and tape classes by creating instance of them, asking the user to fi ll in data with getdata(), and then displaying data with putdata().
Problem 18
Declare a class Vehicle. From this class derive two_wheeler, three_wheeler and four_wheeler class. Display properties of each type of vehicle using member function of the class.