Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sound FX (two-deux,five-cing, one un, three trois, four quatre (siskel-ebert, girl-boy, heads-tails, ready-begin, first-last, begin-end) egis-end, bay-girl, ebert-siskel Sest-last, eads Write the output that is

image text in transcribed

Sound FX (two-deux,five-cing, one un, three trois, four quatre (siskel-ebert, girl-boy, heads-tails, ready-begin, first-last, begin-end) egis-end, bay-girl, ebert-siskel Sest-last, eads Write the output that is printed when the given method below is passed each of the tollowing maps as its parameter. Assume that each parameter map stores its key/value pairs in exactly the order shown, and that is the order in which a for-each loap would examine them Recall that maps print in a hey1-valueT, key2-value2, keyN-valueN] format Your answer should dsplay the right keys and values in the right order Submit public static void mapMysteryl (MapkString, String> map) f O You passed 2 of 4 tests. Try again. String, string> result new TreeHapcString, String>(); for (String key map.keySet()) f question #1: your answer (two-deux, five-cinq, one-un, three-trois, four-quatre) cinq-five, deux two, four-quatre, one un, three trois) if (key.compareTo(map.get(key)) e) reault: pass result.put(key, map.get(key)); else question#2: {skate-board, drive-car, program.conputer, play.conputer) your answer (board skate, caredrive, conputer progran) result.put(map.get(key), key): result: Ofal question #3: (siskel-ebert, girl-boy, heads-talls, ready-begin, first-last, your answer: fbegineend, boy girl, ebert siskel, first last, heads-tails) System.out.printin(result) begin-end) resuit: pass question 4 (cottonsshirt, tree violin, seedstree, 1ight-tree, rainecotton) your answer: (cotton shirt, light-tree, seed tree, treeaviolin) result: O fal

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions