Knight Moves
Write a program that places Knight on the left hand corner of the chess board. Think of the board as a 2 dimensional array.
0 1 2 3 4 5 6 7
0
1
2
3
4
5
6
7
The knight is placed at 0,0 first. You then move the knight and mark the board. You cannot move it to this position again. Keep moving the knight till it is stuck. You can use an array of x,y co-ordintates to determine the next moves. There are 8 possible moves. You can keep track of the moves with things like
x = -1 , y = -2
x = +1 , y =2
This can move the knight backward and left or right of the current position. You need to make sure that the knight does not go out of the board in addition to not being in the same position before. Every time you move you need to print to the console where you moved.
Logger
Write a logger class to help you log statements. The class will take a filename string in the constructor . Also when the class logs messages it should log the current date time to the log file before the message.
Restaurant Reservation
You are to design a program that keeps track of reservation system in a restaurant. There are 20 tables and the hours are 8am to 10pm Mon to Sun.
The menu looks like:
1) Enter a reservation.
2) Print reservation.
If you select 1) then the following sample interaction happens with the user.
Enter reservation date:
8/10/2018
Enter reservation name:
Ajay Mittal
Table Alocated:
3
after which the main menu appears. If option 2 is selected then the following menu appears
1) Enter day
2) Enter month
if the user selects 1 then the user can input a date and all the reservations for that date are printed out.
If the user selects option 2) then all the reservations for that month are printed out. The print outs should be in time ascending order.
Knight Moves
See attached file knight_moves.cpp