I have a C++ Assignment ad I am completely loss.
I have a C++ Assignment ad I am completely loss. Thanks in adavance.
ATTACHMENT PREVIEW Download attachmentWeek 7 AssignmentsWeek 7: Scope and ClassesInstructionsComplete the following assignments. Copy and paste your Fnished code into a Worddocument, clearly identifying which assignment it is. Also, capture the output of the programand paste that into the Word document. If there are questions to be answered, put theanswers after the output. When you complete all three of this week’s assignments, save thedocument asyourLastName_GSP115_W7_Assignments.docx. Submit to the Week 7assignment Dropbox.1. Debugging ChallengeYou should be busy designing and writing your expansion to the Course Project, so thisweek’s assignment will be a debugging challenge. We have revised the slot machine code tomake the payouts easier to change, but a lot of bugs were created in the process—bothcompile time and run-time bugs. Your job is to get the code running correctly. As before, thecode may look like it’s working but could still have the occasional bug that only rarely showsup. You will only be held responsible for bugs that cause a problem that can be detected. Allother bugs will be declared as features or somebody else’s problem in honor of an age-oldcomputer game development tradition.Here are some clues.You shouldn’t see any blank symbols.There are only three bugs.This version of the slot machine gets its payout table from a text Fle. The text Fle is a seriesof four numbers, such as 2, 2, 2, and 10. The Frst three are symbol numbers, and theymatch the enum numbers. In this case, 2 is Orange. The last number is the payout, so theset of numbers can be interpreted as Orange, Orange, Orange pays out 10. As a result, youcan change the pay out by changing the table. However, to save space, payouts for theCherry are hard coded in to the check4Win function. This was a short cut, but the Cherrypayouts could have been set in the text Fle. In case you haven’t already Fgured it out, youwill need to create the text Fle and put it in the same folder as your main.cpp Fle. Here is acopy of the text in the text Fle this program was tested with.0 0 0 1 1 1 1 10 2 2 2 15 3 3 3 20 4 4 4 40 5 5 5 200 4 4 2 25 4 4 3 30Here is the code.// Week 7 Assignment-1// Description://———————————-//**begin #include Fles************#include<iostream>// provides access to cin and cout#include<iomanip>#include<array>#include<vector>

View the AnswerWeek 7 Assignments#include<sstream>#include<fstream>//–end of #include Fles———–//———————————-usingnamespacestd;//———————————-//**begin global constants**********// number of positions on a reel (10)constintreelPositions = 11;// create enum for symbolsenumsymbol{Lemon, Cherry, Orange, Bell, Bar, Jackpot};// deFne a struct for slot machine wheelstructWheel{array<string, reelPositions> symbols;array<symbol, reelPositions> eSymbols;intposition;string selected;};//–end of global constants———//———————————-//**begin function prototypes*******voidloadWinSheet(vector <array<int,4> > &);intcheck4Win(vector <int>, vector <array<int,4> > &,int);//void createSlotMachine(array <Wheel, 3> &);//–end of function prototypes——//———————————-//**begin main program**************intmain(){// seed random number generatorsrand(time(NULL));// create the payout table// deFne a vector for the payout tablevector <array<int,4> > winSheet;loadWinSheet(winSheet);//create an array of three slot machine wheelsarray<Wheel, 3> slotMachine ={{{{“Orange”,”Cherry”,”Orange”,”Lemon”,”Orange”,”Bar”,”Lemon”,”Bell”,”Jackpot”,”Bell”},{Orange, Cherry, Orange, Lemon, Orange, Bar, Lemon, Bell, Jackpot, Bell},0,”Orange”},{{“Bell”,”Lemon”,”Orange”,”Bar”,”Jackpot”,”Bar”,”Lemon”,”Cherry”,”Jackpot”,”Bell”},{Bell, Lemon, Orange, Bar, Jackpot, Bar, Lemon, Cherry, Jackpot, Bell},1,”Lemon”},{{“Cherry”,”Lemon”,”Bar”,”Lemon”,”Orange”,”Orange”,”Lemon”,”Cherry”,”Jackpot”,”Bell”},{Cherry, Orange, Bar, Lemon, Orange, Orange, Lemon, Cherry, Jackpot, Bell},3,”Bar”}}};
