Question: Please using java programming to answer. A library stores the information of its books in a Java map bookMap. Part of the information is as

Please using java programming to answer.

A library stores the information of its books in a Java map bookMap. Part of the information is as given below:

Book Title Price($) Price($)
Introduction to Computer 200
Java Programming 250
Computer Network 150

(a) Create and initialize the map bookMap containing the above information using the book title as the key (assume it is unique).

(b) Assume there are many books, write a program segment to find the average price of the books.

(c) Write a program segment to find the title of the book with minimum price.

(d) Write a program segment to output each title and its corresponding price of the books with "Computer" in their titles. When there is no book with the string "Computer" in its title, "No book with 'Computer' in its title" should be output.

Hint: To find a substring str in a string starting from position fromIndex, use the string method

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!