Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java problem, zoom to get a clearer view. java language, POD O thery Array Doc Week 421 1. POD: Items in the trolley saved 5

java problem, zoom to get a clearer view. image text in transcribed
image text in transcribed
image text in transcribed
java language,
image text in transcribed
POD O thery Array Doc Week 421 1. POD: Items in the trolley saved 5 points possible Reset to Starter Code Instructions You will be given a grocery list followed by a sequence of tems that have already been purchase you are going to determine which he You know what to buy remain on the the list and out them so that You will be give an integer that describes how many time on the original grocery st. Following that you will be given as of n grocery stomstrings that you need to buy Arte Your Grocery it is complete you will receive a list of tems that had already been burchased for each of these tensifit matches item on your grocery it, you can make them as purchased You will know that you are at the end of the list of its ready purchased when you receive the string 'DONE At that point you will output a list of best to buy leach tomon its own write the body of the program Details Input The program reads the flowing antegen defining the length of the original grocery .n g that make up the grocery of that had already been purchased in . the DONE mwing the end of required out Processing Denenming which toms on the grocery st have aroody boon purchased Output Doctems that were not included in the road Burchased PUMS possible Uput them trom me grocery Starman be purchased t hem tomme ongnangroce om must be printed on its own line The text must be mined by a wine character don escort mer roman to be percred Worms e con congue Sample input/output Apple bananas carrota couplant carrota Do bananas Pojava o New 2 3 CSCI 1110 author your flame 6- import java.util."; 3. public class Pop 10- public static void main(String[] args) NO Pobjave New 3 *CSCI 1112 - Cauthor your lane 6 - import java.util."; 8. public class POD { public static void main(String[] args) { [/Instantiate new scanner to read from the console. Scanner in = new Scanner(System.in); //PLEASE START YOUR WORK HERE //PLEASE END YOUR WORK HERE Instructions You will be given a grocery list, followed by a sequence of items that have already been purchased. You are going to determine which i you know what to buy s remain on the the list and output them so that You will be give an integer that describes how many tems are on the original grocery list. Following that you will be given a list of grocery list items (strings) that you need to buy. After your grocery list is complete you will receive a list of items that had already been purchased for each of these items if it matches any tom on your grocery list, you can mark that item as purchased You will know that you are at the end of the stof items already purchased when you receive the string "DONE" At that point you will output a list of items left to buy each item on its own line Write the body of the program Details Input The program reads the following an integer, n defining the length of the original grocery it n strings that make up the grocery list Ist of items that had already been purchased (strings) the string DONE marking the end of all required input Processing Determine which toms on the procery list have already boon purchased Output Ourut the remstromme grocery edown ne that remains to be purchased text m eet items from the original grocery terms that were not included in the list of some ready burchased Echo new character

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