Sunday 21 May 2017

NIIT CORE JAVA ASSIGNMENT SEM 4 ~ NIIT POST

Maryland PM University, often called MPM, is a private research university in the field of engineering located in Pittsburgh, Pennsylvania. MPM is regarded as an engineering university that performs quality research activities. MPM provides an extensive collection of study materials that include books, research articles, and reference materials through the MPM Research Library located in the university campus. The library remains open from 9 am to 8 pm throughout a week. Students and staff members having an MPM University ID card can visit the library to study books. 
The management of MPM, after receiving several requests and feedbacks from students and staff members, has decided to allow borrowing of a section of study materials. The management has framed policies for identifying study materials that can be borrowed and taken out from the library. Based on the policies, the library staff has created and categorized the list of study materials that can be borrowed. 
The management now wants to create a Library Management System (LMS) that will automate the process of issuing study materials to be taken out from the library and receiving them back. To create the LMS, the management has asked the Computer Science department to create a team of developers who will analyze and develop the system. As a senior university student, you have been assigned to lead the team to create the LMS.
Based on your initial meeting with the library staff, you have analyzed that the study materials of the library are divided in the following eight categories: 

       General Studies
       Aerospace Engineering
       Agricultural and Biological Engineering
       Civil and Environmental Engineering
       Computer Science
       Electrical Engineering
       Materials Science and Engineering
       Mechanical Science and Engineering
The library staff has assigned each study material that can be borrowed with one of the following three borrowing periods:

       Small Period: 3 days
       Mid Period: 7 days
       Long Period: 15 days
In subsequent meetings, you have collated the requirements of the LMS. The LMS will be a standalone application used by the librarian at the issuing desk. The LMS should allow a librarian to check the availability of a study material and also issue an available study material. 
In addition, the LMS should allow a librarian to generate a Daily Defaulter Report (DDR) for each category of study material and store it in the file system as a text file. A DDR will contain information of staff members and students who have not returned a borrowed study material within the stipulated period. 
A DDR file will contain the following pieces of information:

       DDR generation date 
       MPM University ID, name, and phone number of the defaulter
       Study material ID and name
       Issue date
       Number of defaulting days
The LMS should also allow the receptionist to merge all the DDR files to create a single Consolidated Defaulter Report (CDR) file at the end of each working day. The receptionist will share the CDR file with the library head on a daily basis. 
You have been assigned the task of analyzing the scenario and lead the team in creating the LMS.



QUESTION 1


You need to analyze the object and information structure in the given scenario and perform the following tasks: 
1.  Identify the primary classes and their relationships. The primary classes should model the borrowers and study materials.  

2.  Create the primary classes with their required fields and methods. 




QUESTION 2

Once the primary classes are created, you need to perform the following tasks: 
Create the database tables in Derby and populate the tables with the sample data. The following figure shows the structures of the tables that you need to create. 

                                                     The Structure of the Tables 

Implement the following classes that use JDBC to interact with the database tables:

  Implement a class that performs the following functions:  
  Insert record of the issue of a study material to the BORROWER table. 
  Update the RETURNDATE field of the BORROWER table whenever a study material is returned.

  Update the CURRENTAVAILABLECOPY field of the STUDYMATERIAL table whenever a study material is issued or returned.
  Implement a class that queries the STUDYMATERIAL table to retrieve the availability status of study materials. 




QUESTION 3

After creating the JDBC classes, you need to implement the defaulter reporting module of the application. To implement this module, you need to perform the following tasks: 
1. Create a class that generates DDR files for each study material category in the file system. The files should be created in the following directory structure format: 

MPM/<STUDY MATERIAL Category>/<DD-MM-YYYY>.txt 

In the preceding format: 
  <STUDY Category MATERIAL>:  Is the category of a study material, such as General Studies, Aerospace Engineering, and Computer Science. 
  <DD-MM-YYYY>: Is the date, month, and year for which the report is created. 
2. Create a class that creates the CDR file by implementing the following functions:  
  The class should merge the content of DDR files for each category to create a CDR file in the following location and format: 

MPM/Defaulter/CDR_<DD-MM-YYYY>.txt 


  Once a new CDR file is created, the class should move the existing CDR file to the following location: 

MPM/Archive/CDR 


  The class should perform the operations to copy from each DDR file to the CDR file using separate threads. 




QUESTION 4

You need to test and debug the application. You need to use the console to input test data and verify the outputs based on the requirement of the system. You also need to validate that the input data conforms to the data format used in the application.


No comments:

Post a Comment