Write a Java program that simulates a basic library delivery system. The user of the program will be able to add different types of items to library collection. In your program, as the main data structure, use the generic collection class ArrayList to store String references. Create three instances from ArrayList of String references. The first one will store the types, the second one will store the items, and the third one will store the owners of the items. The types are exactly the following: "Book", "DVD", "Magazine". The items and their owners will be read from the keyboard. Regarding the matching between an item and its owner, the location (index value) of an item in the list of items will be the same with the location of its corresponding owner in the list of owners. As the next step, create the fourth instance from ArrayList of String references and call this list as itemsDeliveredByOwners. This last list will store String references to indicate the owners of the items (such as the following: "ownerX has delivered the itemNameY from typeZ collection").

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a Java program that simulates a basic library delivery system. The user of the program will be
able to add different types of items to library collection. In your program, as the main data structure,
use the generic collection class ArrayList to store String references.
Create three instances from ArrayList of String references. The first one will store the types, the
second one will store the items, and the third one will store the owners of the items. The types are
exactly the following: "Book", "DVD", "Magazine". The items and their owners will be read from
the keyboard.
Regarding the matching between an item and its owner, the location (index value) of an item in the
list of items will be the same with the location of its corresponding owner in the list of owners.
As the next step, create the fourth instance from ArrayList of String references and call this list as
itemsDeliveredByOwners. This last list will store String references to indicate the owners of
the items (such as the following: "ownerX has delivered the itemNameY from
typeZ collection").
After reading any number of items and their owners, the program will finally print the contents of
itemsDeliveredByOwners list. Please, consider the sample output shown below

please help me to solve this

Write a Java program that simulates a basic library delivery system. The user of the program will be
able to add different types of items to library collection. In your program, as the main data structure,
use the generic collection class ArrayList to store String references.
Create three instances from ArrayList of String references. The first one will store the types, the
second one will store the items, and the third one will store the owners of the items. The types are
exactly the following: "Book", "DVD", "Magazine". The items and their owners will be read from
the keyboard.
Regarding the matching between an item and its owner, the location (index value) of an item in the
list of items will be the same with the location of its corresponding owner in the list of owners.
As the next step, create the fourth instance from ArrayList of String references and call this list as
itemsDeliveredByOwners. This last list will store String references to indicate the owners of
the items (such as the following: "ownerX has delivered the itemNameY from
typeZ collection").
After reading any number of items and their owners, the program will finally print the contents of
itemsDeliveredByOwners list. Please, consider the sample output shown below:
Please choose the type of the item from below list:
Press 1 for Book
Press 2 for DVD
Press 3 for Magazine
1
Please enter the item:
The Lord of the Rings: The Fellowship of the Ring
Please enter the owner of the item:
Çağkan Uludağlı
Press 1 to continue adding item, 0 to exit
1
Please choose the type of the item from below list:
Press 1 for Book
Press 2 for DVD
Press 3 for Magazine
2
Please enter the item:
Harry Potter and the Philosopher's Stone
Please enter the owner of theitem:
Transcribed Image Text:Write a Java program that simulates a basic library delivery system. The user of the program will be able to add different types of items to library collection. In your program, as the main data structure, use the generic collection class ArrayList to store String references. Create three instances from ArrayList of String references. The first one will store the types, the second one will store the items, and the third one will store the owners of the items. The types are exactly the following: "Book", "DVD", "Magazine". The items and their owners will be read from the keyboard. Regarding the matching between an item and its owner, the location (index value) of an item in the list of items will be the same with the location of its corresponding owner in the list of owners. As the next step, create the fourth instance from ArrayList of String references and call this list as itemsDeliveredByOwners. This last list will store String references to indicate the owners of the items (such as the following: "ownerX has delivered the itemNameY from typeZ collection"). After reading any number of items and their owners, the program will finally print the contents of itemsDeliveredByOwners list. Please, consider the sample output shown below: Please choose the type of the item from below list: Press 1 for Book Press 2 for DVD Press 3 for Magazine 1 Please enter the item: The Lord of the Rings: The Fellowship of the Ring Please enter the owner of the item: Çağkan Uludağlı Press 1 to continue adding item, 0 to exit 1 Please choose the type of the item from below list: Press 1 for Book Press 2 for DVD Press 3 for Magazine 2 Please enter the item: Harry Potter and the Philosopher's Stone Please enter the owner of theitem:
Please choose the type of the item from below list:
Press 1 for Book
Press 2 for DVD
Press 3 for Magazine
1
Please enter the item:
The Lord of the Rings: The Fellowship of the Ring
Please enter the owner of the item:
Çağkan Uludağlı
Press 1 to continue adding item, 0 to exit
1
Please choose the type of the item from below list:
Press 1 for Book
Press 2 for DVD
Press 3 for Magazine
2
Please enter the item:
Harry Potter and the Philosopher's Stone
Please enter the owner of the item:
Tugay Direk
Press 1 to continue adding item, 0 to exit
Library information listed below:
Çağkan Uludağlı has delivered The Lord of the Rings: The Fellowship of the Ring
from Book collection.
Tugay Direk has delivered Harry Potter and the Philosopher's Stone from DVD
collection.
Transcribed Image Text:Please choose the type of the item from below list: Press 1 for Book Press 2 for DVD Press 3 for Magazine 1 Please enter the item: The Lord of the Rings: The Fellowship of the Ring Please enter the owner of the item: Çağkan Uludağlı Press 1 to continue adding item, 0 to exit 1 Please choose the type of the item from below list: Press 1 for Book Press 2 for DVD Press 3 for Magazine 2 Please enter the item: Harry Potter and the Philosopher's Stone Please enter the owner of the item: Tugay Direk Press 1 to continue adding item, 0 to exit Library information listed below: Çağkan Uludağlı has delivered The Lord of the Rings: The Fellowship of the Ring from Book collection. Tugay Direk has delivered Harry Potter and the Philosopher's Stone from DVD collection.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY