The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hi, can you help me with this question? Need to use array.
Â
QuestonA bookstore owner wants to maintain informaTon about all the books in stock. Design, write in Java, testand document a program which must have at least two class deFniTons:• A book class which can be used to represent the details of a book together with someassociated operaTons, and• A client class of the book class±he book class will have data members described as follows, which should be declared asprivaTe:(a)±itle of the book - a string of characters(b)Name of the Frst author (surname followed by Frst name or iniTal) – a string of characters(c)Publisher – a string of characters(d)Year of publicaTon – an integer(e)ISBN – a long integer(f)Price – a ²oat or double(g)Number of copies in stock (quanTty) – an integerInclude the member methods to perform the various operaTons on the objects of book class.³orexample, the usual operaTons that can be performed on the Ttle are to get the Ttle and to set the Ttle.Similarly, the typical operaTons that can be performed on the number of copies in stock are to get thenumber of copies in stock, set the number of copies in stock, and update the number of copies in stock(i.e. increase the quanTty of exisTng stock). Add similar operaTons for the publisher, year of publicaTon,ISBN, book price, and author. ±he book class will have at least the following constructors and methods:(i)±wo constructors - one without any parameters (the default constructor), and one with parameters togive iniTal values to instance variables(ii)A reasonable number of set, get and update methods to perform the various operaTons as explainedin the above paragraph(iii) Input and output methods(iv) A method which calculates and returns the total value (in dollar terms) of a parTcular Ttle (book) instock(v)Anequalsmethod which compares two book objects and returns true if they have the same Ttle, thesame author and the same ISBN.You may add other methods as you see appropriate. However, you will need to document them clearly.
Attachments: