Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming lamguage is java Task 5:Set and Map Define a Set and Map as following: Set setStrings - new HashSet(); Set setIntegers new HashSet(); Map

programming lamguage is java image text in transcribed
Task 5:Set and Map Define a Set and Map as following: Set setStrings - new HashSet(); Set setIntegers new HashSet(); Map map - new HashMap(); 1 - Ask the user to input an integer N, then ask the user to input N integers in both digits and in words as following: If the users entered N as 3: Please enter 3 different integers in both digits and words: Digits: 1 Word: One Digits: 4 Word: Four Digits: 5 Word: Five 2-add each entered digits into setIntegers.its string into setStrings, and match the digit and its word in the map, 3-print both sets, and mapiteratively. 4-using a loop, ask the user to enter random digits. check if the integer exists in setIntegers, if yes. print its mapped string from the map. 5 - now. ask the user to enter a word, check for its existance in serStrings, if yes, print the mapped digit

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago