Create anabstractclass named that includesprivatefields
for the InternationalStandard BookNumber(ISBN),price, author anda protected
fieldtitle. Include properties for eachfield. (An ISBN is aunique number
assigned to eachpublished book.) Providepublicget and set accessors for
eachfield.Create a child class named that includes aprivategrade levelfield,
andachildclass that contains no aditionalfields.(Note: Youyourself have to
decide on the data type and name ofthe field.)The following class
diagram demonstrates the scenario. Include agetTitleabstract method
(which is just an
method) in theBookclass and override this method in its subclasses.
In the child classes, overide the accessormethodofa ’sprice
so that s must be pricedbetween $20.0 and $80.0, inclusive, and themust
bepriced between $35.0 and$10.0, inclusive.Also provide get and set accessors
forgrade levelfieldin theclass named .Overloadconstructors for allclasses.
two User Interfaces (forms):ILoginandIBook.
TheILoginwill be used to get access to the IBook
interface. Once successfully logged-in the IBookinterface should be displayed.
(Use the following data for LoginUserName:
respectively.Use Either JLabel,JTextField and JButton
ortheJOptionPane instead, fordata entry, i.e.setting values forthe datamembers
andoutputthevaluesof allthe data membersin anicely formattedfashion.(Note:
youyourself have to anticipatethe display of the interface)You
are only required to validate the Books price in TextBook and CoffeeTableBook
Classes. Assume that the
does the other work (entry) correctly i.e. no other error handling is required.
for eachsuper & subclassmethod to describe what the
method is doing when invokedbythe mainprogram.Also writeyourstudent Id number,
name and program of study at the top of theJFrame classusing comments.