/RaftLab-Test

Primary LanguageJavaScript

RaftLab Test

Question 1

  1. Write software that reads the CSV data (of books, magazines, and authors) given on the next page.
  2. Print out all books and magazines (on either console UI) with all their details (with a meaningful output format).
  3. Find a book or magazine by its ISBN.
  4. Find all books and magazines by their authors’ email.
  5. Print out all books and magazines with all their details sorted by title. This sort should be done for books and magazines together.
  6. Add a book and a magazine to the data structure of your software and export it to a new CSV file.

Solution

Run following command to start the program

Alt text


Search by Isbn number

Alt text

Question 2

  1. Write a program that takes the position of a Knight as an input on an 8x8 chessboard.
  2. Given the position of the Knight, find all the possible places where the Knight can move. You can assume that there are no pieces of the opposite color and hence no blocks.

Solution

Alt text