Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use java thanks Write a class called Book. The Book class is described by 5 (five) variables namely; title, author, book category, price and

please use java thanksimage text in transcribed

Write a class called Book. The Book class is described by 5 (five) variables namely; title, author, book category, price and version. + a. Declare the 5 (five) instance variables (5 marks) b. Create a constructor which accepts a book title, author, book category and price as (5 marks) (5 marks) d. Write a driver class and name the class as Bookshop. Then create an object called the argument. c. Write a toString0 method which prints out the variable values student one which initializes the constructor with the following details i. Title: Object Oriented Programming i. Author: Daniel Liang i Category: iv. Version 10 v. Price: 160.00 Programming vi. Ca the toString) method in the driver class to display the details of the object created in (d) (5 marks) vii. Create an array to called storybook to store 2 (two) books objects with the following details (5 marks) Category Fiction Fiction Title Price 25.00 32.00 Author Version Hansel And GrateDa Rapunzel Thomas 3 viii. Print out the contents of the storybook array created in part(f). (5 marks)* ix. Print out the total price of the two books in the storybook array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions