Question: public static wid madisting [ ] args ) throws IOExceptfon { boolean found = false; int cntFound = 0 ; int numSKUs = 0 ;
public static wid madisting args throws IOExceptfon
boolean found false;
int cntFound ;
int numSKUs ;
String partSkU, partName, manufacturer, country;
String outstring;
Scanner scnr new ScannerSystem In;
Get the PartSKU to Search from the User
System,out.printlnPROMPT;
String search scnrnextlinestriptoUpperCase;
System.out.printlin
To do: insert your command for loading the INVENTORY FILE here and a scanner object to hold it called "inFilin file" that we'll use to hold data.
TO DO: Loop through the Scanner inFile using a while loop to load
each successive line into the appropriate variables that we predefined:
partSKU, partName, manufacturer, country.
If the SKU was found at least once, print "SKU FOUND: partSKU on the first item found and then print to the console the found information for each item found in the array as
partName manufacturer country
Use counters to track how nany objects you've found and how many you've searched in the file.
See the variables that we've provided and see if those can help you do that.
: TO DO: If more than one match were found, print the WARNING message to the console
: TO DO: Display standard completion messages for the different cases:
If no matches were found:
No SKUs were found for: search
If at least record was found
where # is the variable you're using for the # of records found:
# record s found."
Also, print to the console how many records you searched
where # is the variable you're using for the total records
# "records searched,"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
