Design and implement the class Book that contains the following data fields: bookTitle and mm w w bookPublisher as String, and bookPrice as double value. Implement the following member methods: 1. Two constructors: one without arguments and another one with arguments. 2. setBookTitle that takes as parameter a title. It should store it in bookTitle. ww w m 3. setBookPublisher that takes as parameter a publisher. It should store it in bookPublisher. 4. setBookPrice that takes as parameter a price. It should store it in bookPrice.. 5. getBookTitle that returns the bookTitle of Book object. www m 6. getBookPublisher that returns the bookPublisher of Book object. 7. getBookPrice that returns the bookPrice of Book object. w www m 8. tostring that allows to displays the Book data using the output statement. ar m wm 9. makecopy that copies the instance variables of a Book object into another Book object. 10. getcopy that creates and returns the address of the object which is a copy of another Person object. 11. printInfo that displays Book data on the standard output. m ng Test your program by writing an appropriate class driver.
Design and implement the class Book that contains the following data fields: bookTitle and mm w w bookPublisher as String, and bookPrice as double value. Implement the following member methods: 1. Two constructors: one without arguments and another one with arguments. 2. setBookTitle that takes as parameter a title. It should store it in bookTitle. ww w m 3. setBookPublisher that takes as parameter a publisher. It should store it in bookPublisher. 4. setBookPrice that takes as parameter a price. It should store it in bookPrice.. 5. getBookTitle that returns the bookTitle of Book object. www m 6. getBookPublisher that returns the bookPublisher of Book object. 7. getBookPrice that returns the bookPrice of Book object. w www m 8. tostring that allows to displays the Book data using the output statement. ar m wm 9. makecopy that copies the instance variables of a Book object into another Book object. 10. getcopy that creates and returns the address of the object which is a copy of another Person object. 11. printInfo that displays Book data on the standard output. m ng Test your program by writing an appropriate class driver.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Computer

Transcribed Image Text:Object Oriented Programming (INT201)
2nd Semester 2020-2021
Lab 5 - Exercises
Exercise #1
Design and implement the class Book that contains the following data fields: bookTitle and
w
bookPublisher as String, and bookPrice as double value. Implement the following member methods:
www w m
1. Two constructors: one without arguments and another one with arguments.
2. setBookTitle that takes as parameter a title. It should store it in bookTitle.
3. setBookPublisher that takes as parameter a publisher. It should store it in bookPublisher.
4. setBookPrice that takes as parameter a price. It should store it in bookPrice..
5. getBookTitle that returns the bookTitle of Book object.
www
6. getBookPublisher that returns the bookPublisher of Book object.
7. getBookPrice that returns the bookPrice of Book object.
8. toString that allows to displays the Book data using the output statement.
9. makecopy that copies the instance variables of a Book object into another Book object.
10. getcopy that creates and returns the address of the object which is a copy of another Person object.
11. printInfo that displays Book data on the standard output.
ww m w
Test your program by writing an appropriate class driver.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education