   c++ function help
  This is gonna sound a little homework like because it's been given to me by a friend to increase my c++ skills.i'm working on a c++ console application and i'm writing a function for a model airline reservations.my function is suppose to produce a table of letters and rows.  it will take values from a file they are the number of rows (12) and then how many seats per row (4) and then how many rows are upper class (4) and display them out using cout.the variables are already set, for this we'll call them varA, varB, and varC.There is an array already built, that holds max rows and max seats, however not sure how to make use of that or if i should even use that.across the top i'm suppose to read in the max seats (4) and set them to A B C D (an actual letter value) i can (char)i if i have a value of 65, 66, 67, 68 (A,B,C,D) then set the rows so it should like below.A B C D1234(there is suppose to be a space here to clarify this is the upper class)56789101112then it'll fill in with data and 0'si was thinking nested for loops, but all that really does is usually give me an endless loop.my current source i've been working with is below.void displayPlane(int plane[][MAX_SEATS_PER_ROW], int numFirstClassRows,   int numRows, int seatsPerRow){for (int row = 1; row < numRows; row++){cout << setw(4) << row;//for (int col = 1; col < seatsPerRow; col++)//cout << setw(2) << col;}//for (int firstClassRows = 1; firstClassRows < numFirstClassRows; firstClassRows++)//{//cout << setw(2) << firstClassRows << endl;//storeRows = firstClassRows;//}cout << endl;for (int coachClassRows = storeRows; coachClassRows < numRows; coachClassRows++)cout << setw(2) << coachClassRows << endl;}
  This must be part of a set of instructor homework excercises then since my Java professor assigned this exact problem not long ago!2. (5 points) Write a Java class called SeatAssignment to assign passengers seats in an airplane. Inthis program, you should assume that there’s a small airplane with seat numberings as follows. Notethat your class should provide a main() method so that the instructor can run your class without aseparate demo program.1 AB CD2 AB CD3 AB CD4 AB CD5 AB CD6 AB CD7 AB CDYour program should display the seat pattern, with an ‘X’ marking the seats already assigned. Forexample, after seats 1A, 2B, and 4C are taken, the display should look likeetc...I personally didn't see the point of it other than working with arrays and chars.Of course you are going to use nested loops to work with the multiple dimensions so you just have to work through it.Looks a lot harder than it really is.;  Nested loops is the most natural approach. If you're getting infinite loops, you've got a bug. Try this article.   