You have been asked by a retail company to create program which will read a file of their clothing
inventory. The data file contains varied inventory items. The first character of the stockID field tells you
which data class the item is of. The file lay out follows the layout of each datatype. Your program will
allow the user to perform two functions. The first function will allow the user to generate a report
displaying the contents of the file you read. The second function will allow the user to search for an item
by the stockID and let the user know the full description of the item and how many items are in stock.
Your program will allow the user to perform two functions:
1. The first function will allow the user to produce a report displaying the contents of the file you
read. Each detail line must report all of the specific clothing type.
2. The second function will allow the user to search for an item by the stockID and let the user
know the full description of the item and how many of the items are in stock.
The Development department has given you the following parameters to write the program
1. Clothing is an abstract class
2. Your data must be stored in a polymorphic array
3. Your search routine must be recursive.
4. If the item the user has entered for the search is not in the array your program will go through
an exception
Use the following layout to create classes:
Clothing
String stockId
String displayName
int quantityOnHand
double price
Pants extends Clothing
int waistSIze
int pantLength
Business and Computer Science Dept
Dress extends Clothing
int sIze
Shirt extends Clothing
int neckSIze
int armLengthLength
boolean tall
This is the Text file :
//item
StockID 29393
Woman: Business Suit: Coat-Pants-Shirt-Dress-Combo (Calvin Klein)
Quantity: 20
Price: $199.00(before Discount)
Waist: 25,26,27,29,30,32
Length: 24,26,28,32,40
Dress Size: 2,4,6,8,10,12
Shirt Size: Neck: 8,9,10,11,12,14; Arm: 20,22,24: Body-Size: Medium; Tall: Special Order
// item
StockID 19395
Woman: Casual Attire: Coat-Pants-Shirt-Dress-Combo (Giorgio Armani)
Quantity: 10
Price: $299.00(before Discount)
Waist: 25,26,27,29,30,32
Length: 24,26,28,32,40
Dress Size: 2,4,6,8,10,12
Shirt Size: Neck: 8,9,10,11,12,14; Arm: 20,22,24: Body-Size: Large; Tall: Special Order
//item
StockID 39391
Woman: Holiday Collection: Coat-Pants-Shirt-Dress-Combo (Smith-Jones New Addition)
Quantity: 50
Price: $499.00(before Discount)
Waist: 25,26,27,29,30,32
Length: 24,26,28,32,40
Dress Size: 2,4,6,8,10,12
Shirt Size: Neck: 8,9,10,11,12,14; Arm: 20,22,24: Body-Size: Small; Tall: Special Order
//item
...
Assume there are 97 more "collections" in this fil