Skip to main content

Mock 3 Slot3 - Handson - 21st July Java (30 Marks) 2. Detailed Information

 The Librarian of Universal Library wants to maintains log for all the books in the library.

Help the librarian to maintain the log in such a way that a book's name should be followed by its Author's name. Refer the output statements for the format.

Note: 

  • The Book name and Author name can contain space in between them. 
  • If the length of book name is less than or equal to 3 display "Invalid Book Name" and terminate the program.
  •  If the length of author name is less than to 6 display "Invalid Author Name".

Please do not use System.exit(0) to terminate the program.


Sample Input 1:

Enter the book name:

Programming in C

Enter the author name:

Richies

Sample Output 1:

Programming in C book was written by Richies

Sample Input 2:

Enter the book name:

Programming in C

Enter the author name:

Rich

Sample Output 2:

Invalid Author Name

Sample Input 3:

Enter the book name:

C++

Sample Output 3:

Invalid Book Name

The Librarian of Universal Library wants to maintains log for all the books in the library.  Help the librarian to maintain the log in such a way that a book's name should be followed by its Author's name. Refer the output statements for the format.  Note:   The Book name and Author name can contain space in between them.  If the length of book name is less than or equal to 3 display "Invalid Book Name" and terminate the program.  If the length of author name is less than to 6 display "Invalid Author Name". Please do not use System.exit(0) to terminate the program.    Sample Input 1:  Enter the book name:  Programming in C  Enter the author name:  Richies  Sample Output 1:  Programming in C book was written by Richies  Sample Input 2:  Enter the book name:  Programming in C  Enter the author name:  Rich  Sample Output 2:  Invalid Author Name  Sample Input 3:  Enter the book name:  C++  Sample Output 3:  Invalid Book Name Mock 3 Slot3 - Handson - 21st July  Java (30 Marks)  2. Detailed Information   Evaluation Result:    Result Description Summary of tests  *Note: All the test cases might not have same weightage +------------------------------+ |  8 tests run/ 8 tests passed | +------------------------------+


Evaluation Result:


 

Result Description

Summary of tests
*Note: All the test cases might not have same weightage
+------------------------------+
| 8 tests run/ 8 tests passed |
+------------------------------+

Comments