Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
nto an electronic health record system. Sometimes, Ana uses the work computer to check personal email and shop online; even though office regulations prohibit it. Pretend that you are Ana’s co-worker, what constructive advice would you give Ana about her on-the-job actions?
“Ana girl you need to stop going on the internet like that you know we can’t do that stuff on the work computers, and what if they check the history or the IT has that thing we’re you can see stuff on your computer on his computer?” ... “ Girl you finna get in some trouble and it’s gonna be your fault because you wanted Victoria Secret perfume” ... “Girl cut it out I’m telling you, and plus how do you know if I’m not IT I could like get you in trouble girl so yeah stop”
Attached are screenshots of the working code - baring in mind this only works on mutable Collection types. (ones that can be changed) if you use Collections that don't support this you may experience an Unsupported Operation Exception - but this is expected.
Explanation:
Using Java streams as an alternative for some answers.