Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have been asked to create an inventory system for an online store using C sharp. You should have one of each class ; Instrument,

You have been asked to create an inventory system for an online store using C sharp. You should have one of each class ; Instrument, Accessories and Inventory with certain attributes to them to to be searched for later. Your program will later have a search method to recall and search using certain attributes for example "looking for fender or walnut color acoustic guitar.
I wrote the following codes. Please help. Only in C sharp please. The main goal is to search for a product and find it in the inventory. this part is to create an active inventory that responds to the search with the attributes searched for.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
class Instrument public string model Number; public string guitarType; public string brand; public string shape; public float size; //In inches public string playingSide; public string material; public float neckLength; public int numberOfStrings; public string stringType; public string getData() return this.model Number + this.guitarType + this.brand + this.shape + this.size + this.playingSide + this.material + this.neckLength + this. numberOfStrings + this.stringType; class Accessories public string brand; public string name; public int stock; public float size; //in inches public string getData() return this.brand + this.name + this.size + this.stock; co class Inventory public string[] args) class Inventory public static void Main(string[] args) List IstInstruments = new List Instrument>(); 1st Instruments.Add(new Instrument()); lstInstruments[0].model Number = "ABC123"; 1st Instruments[0].guitarType = "Electric Guitar"; 1st Instruments[0]. brand = "Yamaha"; 1stInstruments[0].shape = "Parlor" ; 1st Instruments[0].size = 40; 1st Instruments[0].playingside = "Left"; 1st Instruments[0].material = "Mahogany"; 1stInstruments[0].neckLength = 22.5F; 1st Instruments[0].numberof Strings = 6; 1st Instruments[0].stringType = "Steel"; 1stInstruments[1].model Number - "ABC123" ; 1st Instruments[1].guitarType = "Electric Guitar"; lstInstruments[1].brand = "Gibson"; 1stInstruments[1].shape = "Triple- 0"; lstInstruments[1].size = 41; lstInstruments[1].playingSide = "Left"; 1stInstruments[1].material = "Poplar"; 1stInstruments[1].neckLength = 25.5F; 1st Instruments[1].numberofs - 10; 1st Instruments[1].stringTye "Nickel"; 1st Instruments[2].model Number = "ABC123"; 1st Instruments[2] .guitarType = "Acoustic Guitar"; 1st Instruments[2]. brand = "Seagull" ; lstInstruments[2].shape = "Concert"; lstInstruments[2].size = 36; 1st Instruments[2] .playingSide = "Right"; 1st Instruments[2].material = "Alder"; 1st Instruments[2].neckLength - 24; 1st Instruments[2].numberOfStrings = 12; 1stInstruments[2].stringType = "Brass"; 1st Instruments[3].model Number = "ABC123"; 1st Instruments [3] .guitarType = "Steel Guitar"; 1stInstruments [3]. brand = "Guild"; 1st Instruments[3] .shape - "Dreadnought"; 1stInstruments[3].size = 38; 1stInstruments[3] .playingSide = "Left"; 1stInstruments[3].material = "Maple"; 1stInstruments [3] . neckLength = 25.5F; 1st Instruments[3] . numberOfStrings = 8; 1st Instruments[3].stringType = "Steel"; 1stInstruments[3].model Number = "ABC123"; 1stInstruments[3] .guitarType = "Bass Guitar" ; 1st Instruments[3]. brand = "Ovation"; 1stInstruments[3].shape - "Concert"; 1stInstruments [3]. size = 36 1stInstruments [3] .playingSide = "Left"; "Left"; 1st Instruments[3].material = "Spruce"; 1st Instruments [3] . neckLength = 22.5F; 1stInstruments[3] . numberOfStrings 6; 1st Instruments[3].stringType = "Nylon"; 1st Instruments[4].model Number = "ABC123" ; 1stInstruments[4].guitarType - "Flamenco Guitar"; 1stInstruments[4]. brand = "Fender" ; 1st Instruments[4]. shape = "Parlor"; 1st Instruments ( 4 ).Size = 41; 1st Instruments[4] .playingSide - "Right"; 1st Instruments[4].material = "Basswood"; 1st Instruments[4].neckLength = 25.5F; 1stInstruments[4]. numberOfStrings 6; 1st Instruments[4].stringType - "Bronze" ; 1st Instruments[5].model Number = "ABC123" ; 1st Instruments[5] .guitarType = "Acoustic Electric Guitar"; 1st Instruments[5]. brand = "Washburn"; lstInstruments[5].shape - "Jumbo"; 1st Instruments[5].size = 40; 1stInstruments [5] .playingSide = "Right"; 1st Instruments[5].material = "Holly" ; 1st Instruments[5].neckLength - 24; 1st Instruments (5). numberOfStrines = 12; 1st Instruments[5].stringTye Co "Brass" ; 1st Instruments[6].modelNumber = "ABC123"; 1st Instruments[6] .guitarType = "Electric Guitar"; 1st Instruments[6] .brand = "Epiphone"; 1st Instruments[6] .shape = "Triple- 0"; 1st Instruments[6].size = 36; lstInstruments (6).playingSide = "Left"; lstInstruments[6].material = "Walnut"; 1st Instruments[6].neckLength = 22.5F; 1stInstruments[6] . numberofStrings = 7; 1st Instruments[6].stringType = "Nickel"; 1st Instruments[7].model Number - "ABC123"; 1st Instruments[7] .guitarType = "Resonator Guitar"; 1st Instruments[7]. brand = "ESP"; 1st Instruments[7] .shape = "Grand Concert"; lstInstruments[7].size = 38; 1st Instruments[7] .playingSide = "Left"; 1stInstruments [7].material = "Agathis"; 1st Instruments[7] . neckLength = 22.5P; 1st Instruments[7] . numberOfStrings = 12; 1st Instruments[7].stringType = "Steel"; 1st Instruments[8].modelNumber = "ABC123"; 1st Instruments[8] .guitarType = "Classical Guitar"; IstInstruments[8]. brand = "Gretsch"; 1st Instruments[8] .shape = "Dreadnought"; 1st Instruments[8].size = 41; Istme p layingSide = "Dreadnought"; lst Instruments[8].size = 41; 1st Instruments[8] .playingSide = "Right"; 1st Instruments[8].material = "Ash"; 1st Instruments[8] . neckLength = 24; 1st Instruments[8].numberOfStrings = 6; 1st Instruments[8].stringType - "Steel"; 1st Instruments[9].model Number = "ABC123"; 1st Instruments[9] .guitarType = "Acoustic Guitar"; 1st Instruments[9]. brand = "Ibanez" ; 1st Instruments[9].shape = "Jumbo"; 1st Instruments[9].size = 41; lstInstruments[9] .playingSide = "Left"; lstInstruments[9].material = "Mahogany"; 1st Instruments[9].neckLength = 25.5F; 1st Instruments[9]. numberOfStrings = 6; 1st Instruments[9].stringType = "Brass" ; List Istaccessories - new List(); Istaccessories.Add(new Accessories()); Istaccessories[0].name = "Guitar Strap"; lstaccessories[0].brand = "Fender" ; lstaccessories[0].size = 70; // in inches lstaccessories[1].name = "Guitar Stand"; lstaccessories [1].brand = "Fender"; lstaccessories[2].name = "Tuners; lstaccessories 21. brand = "Snark"; letaAcreer 21 = 10 List 1staccessories new List(); 1staccessories.Add(new Accessories ()); 1staccessories[0].name = "Guitar Strap"; 1staccessories[0].brand = "Fender"; 1staccessories[0].size = 70; // in inches 1staccessories[1].name "Guitar Stand"; 1staccessories[1].brand "Fender"; 1staccessories[2].name = "Tuners"; 1staccessories[2].brand = "Snark"; 1staccessories[2].size = 10; // in mm 1staccessories[3].name = "Guitar Picks"; 1staccessories[3].brand = "Fender"; 1staccessories[3].size - 0.46F; // in mm 1staccessories[3].name = "Guitar Humidifier"; 1staccessories[3].brand = "Oasis OH-1"; 1staccessories[4].name = "Guitar String Winder"; 1staccessories[4].brand "D'Addario Pro-Winder"; 1staccessories[4].name "Amplifier"; 1staccessories[4].brand = "Peavy"; 1staccessories[4].size = 12; class Instrument public string model Number; public string guitar Type; public string brand; public string shape; public float size; //In inches public string playingside; public string material; public float neckLength; public int numberOfStrings; public string stringType; public string getData() return this.modelNumber + this.guitarType + this.brand + this.shape + this.size + this.playingSide + this.material + this.neckLength + this. numberof Strings + this.stringType; class Accessories public string brand; public string name; public int stock; public float size; 1/in inches public string getData() return this.brand + this.name + this.size + this.stock; class Inventory public static void Main(string[] args) List IstInstruments - new List(); lst Instruments.Add(new Instrument(); lstInstruments[0].model Number = "ABC123"; Ist Instruments[0].guitarType - "Electric Guitar"; 1stInstruments[0].brand = "Yamaha"; 1stInstruments[0].shape - "Parlor"; 1st Instruments[0].size = 40; 1st Instruments[0].playingside - "Left"; 1stInstruments[0].material = "Mahogany"; 1st Instruments[0].neckLength - 22.5F; 1st Instruments[0].numberOfStrings 1st Instruments[0].stringType = "Steel"; 1st Instruments[1].model Number = "ABC123"; 1st Instruments[1].guitarType = "Electric Guitar"; 1st Instruments[1].brand = "Gibson"; 1st Instruments[1].shape = "Triple- 0"; 1st Instruments[1].size = 41; 1st Instruments[1].playingSide = "Left"; 1st Instruments[1].material = "Poplar" ; 1st Instruments[1].neckLength = 25.5F; = 6; 1st Instruments[0].numberof Strings 1st Instruments[0].stringType = "Steel"; 1st Instruments[1].model Number = "ABC123"; 1stInstruments[1].guitarType = "Electric Guitar"; 1st Instruments[1].brand = "Gibson"; 1st Instruments[1].shape = "Triple- 0"; 1st Instruments[1].size = 41; 1st Instruments[1].playingSide = "Left"; 1st Instruments[1].material = "Poplar"; 1st Instruments[1].neckLength = 25.5F; 1st Instruments[1]. numberOfStrings = 10; 1st Instruments[1].stringType = "Nickel"; 1st Instruments[2].model Number = "ABC123"; 1stInstruments[2] .guitarType = "Acoustic Guitar"; 1st Instruments[2]. brand = "Seagull"; 1stInstruments[2] .shape = "Concert"; 1st Instruments[2].size = 36; 1st Instruments[2] .playingside = "Right"; 1st Instruments[2].material = "Alder"; 1st Instruments[2].neckLength = 24; 1st Instruments[2]. numberOfStrings = 12; 1st Instruments[2].stringType = "Brass"; 1st Instruments[3].model Number - "ABC123"; 1st Instruments[3] .guitarType = "Steel Guitar"; 1st Instruments[3].brand - "Guild"; 1st Instruments[3] .shape - "Dreadnought"; 1st Instruments[3].size = 38; 1st Instruments[3] .playingSide = "Left"; 1st Instruments[3].material = "Maple"; 1st Instruments[3].neckLength = 25.5F; 1st Instruments[3]. numberOfStrings = 8; 1st Instruments[3].stringType = "Steel"; 1st Instruments[3].model Number - "ABC123"; 1st Instruments[3] .guitarType = "Bass Guitar", 1st Instruments[3]. brand = "Ovation"; 1st Instruments[3] .shape = "Concert": 1st Instruments[3].size = 36; lstInstruments[3] .playingside = "Left"; 1stInstruments[3].material - "Spruce"; 1st Instruments[3].neckLength = 22.5F; 1st Instruments[3].numberOfStrings 1st Instruments[3].stringType = "Nylon"; 1st Instruments[4].model Number = "ABC123"; 1st Instruments[4] .guitarType = "Flamenco Guitar"; 1st Instruments[4].brand = "Fender"; 1st Instruments[4].shape = "Parlor"; lstInstruments[4].size = 41; lstInstruments[4].playingside = "Right"; lstInstruments[4].material = "Basswood"; 25.5F; 1st Instruments[4]. neckLength = 1st Instruments[4].numberOfStrings = 6; 1st Instruments[4].stringType = "Bronze" ; 1st Instruments[5].model Number = "ABC123"; 1st Instruments[5] .guitarType - "Acoustic Electric Guitar"; lstInstruments [5]. brand = "Washburn"; 1stInstruments[5] .shape = "Jumbo" ; lstInstruments [5] .Size = 40; 1st Instruments [5] .playingside = "Right"; 1st Instruments[5].material - "Holly"; 1stInstruments[5] . neckLength - 24; 1stInstruments[5] . numberOfStrings = 12; 1st Instruments[5].stringType = "Brass" ; 1st Instruments[6].modelNumber = "ABC123"; 1st Instruments[6] .guitarType = "Electric Guitar"; 1st Instruments[6].brand = "Epiphone" ; 1st Instruments[6].shape = "Triple- 1st Instruments[6].size = 36; 1stInstruments[6] .playingside = "Left": "Walnut"; 1st Instruments[6].material - 1st Instruments[6].neckLength = 1st Instruments[6] .numberof Strings 22.5F; = 7; 1st Instruments[6].stringType = "Nickel"; 1st Instruments[7].model Number = "ABC123" ; 1st Instruments[7] .guitarType - "Resonator Guitar" ; 1st Instruments[7] .brand = "ESP"; 1st Instruments [7].shape = "Grand Concert"; 1st Instruments[7].size = 38; 1st Instruments[7] .playingSide = "Left"; 1stInstruments[7].material = "Agathis"; 1st Instruments[7].neckLength - 22.5F; 1stInstruments[7]. numberOfStrings = 12; 1st Instruments[7].stringType "Steel"; IstInstruments[8].model Number "ABC123"; 1st Instruments[8].guitarType - "Clas sical Guitar"; 1st Instruments[8]. brand = "Gretsch"; 1st Instruments[8] .shape = "Dreadnought"; 1st Instruments[8] . size = 41; 1st Instruments[8] .playingside = "Right"; 1st Instruments[8] .material = 1st Instruments[8]. neckLength = 24; 1stInstruments[8].numberOfStrings 6 : 1st Instruments[8].stringType = "Steel"; 1st Instruments[9].model Number - "ABC123"; 1st Instruments[9] .guitarType = "Acoustic Guitar"; 1st Instruments[9]. brand = "Ibanez" ; 1stInstruments[9] .shape = "Jumbo"; lstInstruments[9].size = 41; 1st Instruments[9].playingSide = "Left"; IstInstruments[9].material = "Mahogany" ; 1st Instruments[9].neckLength = 25.5F; 1st Instruments[9]. numberOfStrings = 6; 1st Instruments[9].stringType = "Brass" ; List Istaccessories = new List(); Istaccessories.Add(new Accessories()); Istaccessories[0].name = "Guitar Strap"; lstaccessories[0].brand = "Fender" ; 1staccessories[0].size = 70; // in inches 1st accessories[1].name = "Guitar Stand" ; 1st accessories[1].brand = "Fender" ; lstaccessories[2].name = "Tuners" ; Istaccessories [2].brand = "Snark"; lstaccessories (2).Size = 10; // in mm Picks" ; 1staccessories [3].name = "Guitar 1staccessories [3] .brand = "Fender"; 1staccessories[3].size - 0.46F; // in mm 1staccessories[3].name "Guitar Humidifier"; "Oasis 1staccessories[3].brand = -1"; 1staccessories[4].name = "Guitar String Winder"; 1staccessories[4].brand = "D'Addario Pro-Winder"; 1staccessories[4].name = "Amplifier"; "Peavy"; 1staccessories[4].brand = 1staccessories[4].size = 12; class Instrument public string model Number; public string guitar Type; public string brand; public string shape; public float size; //In inches public string playingside; public string material; public float neckLength; public int numberOfStrings; public string stringType; public string getData() return this.modelNumber + this.guitarType + this.brand + this.shape + this.size + this.playingSide + this.material + this.neckLength + this. numberof Strings + this.stringType; class Accessories public string brand; public string name; public int stock; public float size; 1/in inches public string getData() return this.brand + this.name + this.size + this.stock; class Inventory public static void Main(string[] args) List IstInstruments - new List(); lst Instruments.Add(new Instrument(); lstInstruments[0].model Number = "ABC123"; Ist Instruments[0].guitarType - "Electric Guitar"; 1stInstruments[0].brand = "Yamaha"; 1stInstruments[0].shape - "Parlor"; 1st Instruments[0].size = 40; 1st Instruments[0].playingside - "Left"; 1stInstruments[0].material = "Mahogany"; 1st Instruments[0].neckLength - 22.5F; 1st Instruments[0].numberOfStrings 1st Instruments[0].stringType = "Steel"; 1st Instruments[1].model Number = "ABC123"; 1st Instruments[1].guitarType = "Electric Guitar"; 1st Instruments[1].brand = "Gibson"; 1st Instruments[1].shape = "Triple- 0"; 1st Instruments[1].size = 41; 1st Instruments[1].playingSide = "Left"; 1st Instruments[1].material = "Poplar" ; 1st Instruments[1].neckLength = 25.5F; = 6; 1st Instruments[0].numberof Strings 1st Instruments[0].stringType = "Steel"; 1st Instruments[1].model Number = "ABC123"; 1stInstruments[1].guitarType = "Electric Guitar"; 1st Instruments[1].brand = "Gibson"; 1st Instruments[1].shape = "Triple- 0"; 1st Instruments[1].size = 41; 1st Instruments[1].playingSide = "Left"; 1st Instruments[1].material = "Poplar"; 1st Instruments[1].neckLength = 25.5F; 1st Instruments[1]. numberOfStrings = 10; 1st Instruments[1].stringType = "Nickel"; 1st Instruments[2].model Number = "ABC123"; 1stInstruments[2] .guitarType = "Acoustic Guitar"; 1st Instruments[2]. brand = "Seagull"; 1stInstruments[2] .shape = "Concert"; 1st Instruments[2].size = 36; 1st Instruments[2] .playingside = "Right"; 1st Instruments[2].material = "Alder"; 1st Instruments[2].neckLength = 24; 1st Instruments[2]. numberOfStrings = 12; 1st Instruments[2].stringType = "Brass"; 1st Instruments[3].model Number - "ABC123"; 1st Instruments[3] .guitarType = "Steel Guitar"; 1st Instruments[3].brand - "Guild"; 1st Instruments[3] .shape - "Dreadnought"; 1st Instruments[3].size = 38; 1st Instruments[3] .playingSide = "Left"; 1st Instruments[3].material = "Maple"; 1st Instruments[3].neckLength = 25.5F; 1st Instruments[3]. numberOfStrings = 8; 1st Instruments[3].stringType = "Steel"; 1st Instruments[3].model Number - "ABC123"; 1st Instruments[3] .guitarType = "Bass Guitar", 1st Instruments[3]. brand = "Ovation"; 1st Instruments[3] .shape = "Concert": 1st Instruments[3].size = 36; lstInstruments[3] .playingside = "Left"; 1stInstruments[3].material - "Spruce"; 1st Instruments[3].neckLength = 22.5F; 1st Instruments[3].numberOfStrings 1st Instruments[3].stringType = "Nylon"; 1st Instruments[4].model Number = "ABC123"; 1st Instruments[4] .guitarType = "Flamenco Guitar"; 1st Instruments[4].brand = "Fender"; 1st Instruments[4].shape = "Parlor"; lstInstruments[4].size = 41; lstInstruments[4].playingside = "Right"; lstInstruments[4].material = "Basswood"; 25.5F; 1st Instruments[4]. neckLength = 1st Instruments[4].numberOfStrings = 6; 1st Instruments[4].stringType = "Bronze" ; 1st Instruments[5].model Number = "ABC123"; 1st Instruments[5] .guitarType - "Acoustic Electric Guitar"; lstInstruments [5]. brand = "Washburn"; 1stInstruments[5] .shape = "Jumbo" ; lstInstruments [5] .Size = 40; 1st Instruments [5] .playingside = "Right"; 1st Instruments[5].material - "Holly"; 1stInstruments[5] . neckLength - 24; 1stInstruments[5] . numberOfStrings = 12; 1st Instruments[5].stringType = "Brass" ; 1st Instruments[6].modelNumber = "ABC123"; 1st Instruments[6] .guitarType = "Electric Guitar"; 1st Instruments[6].brand = "Epiphone" ; 1st Instruments[6].shape = "Triple- 1st Instruments[6].size = 36; 1stInstruments[6] .playingside = "Left": "Walnut"; 1st Instruments[6].material - 1st Instruments[6].neckLength = 1st Instruments[6] .numberof Strings 22.5F; = 7; 1st Instruments[6].stringType = "Nickel"; 1st Instruments[7].model Number = "ABC123" ; 1st Instruments[7] .guitarType - "Resonator Guitar" ; 1st Instruments[7] .brand = "ESP"; 1st Instruments [7].shape = "Grand Concert"; 1st Instruments[7].size = 38; 1st Instruments[7] .playingSide = "Left"; 1stInstruments[7].material = "Agathis"; 1st Instruments[7].neckLength - 22.5F; 1stInstruments[7]. numberOfStrings = 12; 1st Instruments[7].stringType "Steel"; IstInstruments[8].model Number "ABC123"; 1st Instruments[8].guitarType - "Clas sical Guitar"; 1st Instruments[8]. brand = "Gretsch"; 1st Instruments[8] .shape = "Dreadnought"; 1st Instruments[8] . size = 41; 1st Instruments[8] .playingside = "Right"; 1st Instruments[8] .material = 1st Instruments[8]. neckLength = 24; 1stInstruments[8].numberOfStrings 6 : 1st Instruments[8].stringType = "Steel"; 1st Instruments[9].model Number - "ABC123"; 1st Instruments[9] .guitarType = "Acoustic Guitar"; 1st Instruments[9]. brand = "Ibanez" ; 1stInstruments[9] .shape = "Jumbo"; lstInstruments[9].size = 41; 1st Instruments[9].playingSide = "Left"; IstInstruments[9].material = "Mahogany" ; 1st Instruments[9].neckLength = 25.5F; 1st Instruments[9]. numberOfStrings = 6; 1st Instruments[9].stringType = "Brass" ; List Istaccessories = new List(); Istaccessories.Add(new Accessories()); Istaccessories[0].name = "Guitar Strap"; lstaccessories[0].brand = "Fender" ; 1staccessories[0].size = 70; // in inches 1st accessories[1].name = "Guitar Stand" ; 1st accessories[1].brand = "Fender" ; lstaccessories[2].name = "Tuners" ; Istaccessories [2].brand = "Snark"; lstaccessories (2).Size = 10; // in mm Picks" ; 1staccessories [3].name = "Guitar 1staccessories [3] .brand = "Fender"; 1staccessories[3].size - 0.46F; // in mm Istaccessories [3].name = "Guitar Humidifier"; Istaccessories[3]. brand = "Oasis OH-1"; Istaccessories[4].name = "Guitar String Winder"; Istaccessories[4].brand = "D'Addario Pro-Winder"; Istaccessories[4].name = "Amplifier"; lstaccessories[4].brand = "Peavy"; lstaccessories[4].size = 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions