Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

The difference between quality control and quality assurance

Answered: 1 week ago

Question

6. Explain what causes unsafe acts.

Answered: 1 week ago