The major advantage of using structs is to make the C++ codesimpler, easier to read, and easier to work with. After completingthis assignment, students will be able to: • use structs to createand/or introduce new custom data types • implement structs to groupfixed numbers of pieces of data of different types • implementstructs within structs • chaining using the dot operators to accessnested fields • copy an entire structure • create an array of astructured data type • combine structs and arrays with one anotherTask Description: A Decoration Store Manager wants you to create aprogram to keep track some of the best-selling items. You are given4 files: Furnitire.txt, Art.txt, Fabric.txt, and Book.txt. Yourtask is to create an array of structs for each file to hold theentries. The first line of each file will be a number indicatinghow many entries are in the file. Furnitire.txt 1. Name 2. Color 3.Amount of Inventory 4. Date Created (month:day:year) 5. PriceArt.txt 1. Name 2. Price 3. Amount of Inventory 4. Date Created(month:day:year) 5. Dimensions of Art (height:width:depth)Fabric.txt 1. Name 2. Color 3. Amount of Inventory 4. PriceBook.txt 1. Name 2. Hardcover? (1 for yes 0 for no) 3. Amount ofPages 4. Price 5. Amount of Inventory 6. Date Published(month:day:year) Write a C++ program to help the Decoration StoreManager. Create four arrays of structs named Furniture, Art,Fabric, and Book. The size of the array should be read in from thefile. Structs should be created to hold the variables that won’tfit a standard data type. The main() function of your programshould be very simple. The main function should be a collection ofvariables declaration and functions call. You will need to use fourdifferent functions to read the data from the four files. You canadd more functions if you want. You are to give the user theability to print out each section’s records (Furniture, Art,Fabric, and Book). Do NOT use global variables.
These are the files given:
1) Art.txt
12WaterColorPainting 25.95 20 07:02:2015 20:20:1AcrylicPainting 10.22 89 06:15:2014 12:14:1Photo 2.50 4 06:25:2017 10:10:1LatexPainting 22.49 11 08:29:2015 18:13:1PencilDrawing 5.25 56 05:01:2010 12:10:1ClaySculpture 20.25 16 04:19:2011 12:12:3GlassSculpture 15.40 40 09:05:2002 4:18:15PlasticSculpture 2.96 22 05:20:2010 10:10:10WoodenSculpture 27.89 9 03:11:2016 14:12:4MetalSculpture 14.65 1 06:24:2013 18:15:7ConcreteSculpture 3.69 0 03:29:2016 19:28:4MarbleSculpture 29.99 16 06:15:2013 13:20:7
2) Book.txt
16PrideandPrejudice 1 209 10.99 10 04:01:2010ToKillaMockingbird 0 276 10.99 3 03:10:2013TheGreatGatsby 1 257 7.99 3 06:21:2000JaneEyre 1 294 10.99 8 06:01:2005TheCatcherintheRye 1 171 10.99 2 07:06:2006LittleWomen 0 354 10.99 3 02:26:2008HuckleberryFin 1 269 7.99 2 02:27:2015MobyDick 0 278 10.99 1 07:13:2012AliceinWonderland 1 494 10.99 7 08:17:2015LordoftheFlies 1 133 10.99 1 06:06:2016AnimalFarm 1 119 7.99 5 03:22:2015GreatExpectations 0 287 10.99 9 06:13:20131984 0 275 10.99 8 04:14:2017GreatExpectations 1 360 10.99 7 07:23:2016Frakenstein 0 146 10.99 3 03:20:2010TheScarletLetter 1 248 10.99 5 02:28:2014
3) Fabric.txt
10WoolRug white 10 24.20NaturalFiberRug red 21 18.65Drapes brown 15 10.60DoorMat green 50 21.20TableMat red 60 5.95CottonRug white 10 14.26SyntheticRug blue 15 18.10PlaceMat brown 26 2.55ClothNapkins white 18 3.05Curtains grey 28 12.32
4)
14Table brown 10 01:16:2000 100.00Chair black 20 05:14:2006 25.20Couch brown 5 10:21:2015 325.50LoveSeat yellow 3 09:08:2011 145.70RockingChair red 15 06:03:2013 45.60Desk brown 5 11:10:2004 50.00Lamp blue 8 12:06:2014 10.95Light grey 10 06:12:2003 11.00Bed red 7 07:18:2006 150.00HighChair white 11 08:22:2007 25.60FootRest brown 5 08:23:2015 15.95CoffeeTable white 0 06:25:2016 57.10BedsideTable black 2 04:23:2015 45.23Stool brown 25 08:26:2014 20.00