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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started