Library inventory using a client-server model

Assignment Help Data Structure & Algorithms
Reference no: EM13115810

The LIMS to support multiple clients to query and update the library inventory using a client/server model. LIMS should allow multiple clients to safely access the inventory, and using a producer-consumer model to borrow/return library items.

Elaboration:

1. Multiple instances of a client class should be supported.

2. Use threads and locks to provide safe access to the library inventory.

3. Add a field to each record in the database representing the maximum number of that item the library will hold.

4. Functions should include:

o Returning an item to the library, blocking if the maximum number of that item is reached until an item is borrowed.

o Borrowing an item, blocking if the desired item is not in the library until an item is returned.

o Allow a client to cancel a request that has been blocked.

Referancing style: APA style

The scenario is inspired by a LIbrary Management System (LIMS). For the first version of the project, the LIMS is a very basic one, allowing just for the import of data from a text file and perfom some basic search operations.

The elements of the LIMS are: the Library itself (let's consider just one instance for now) that contains a collection of Authors. Each Author includes a collection of Books he/she published.

Eventually (in the next versions of the project), there will be clients that will concurrently access the LIMS in order to borrow/return book copies.  

The Author and Book classes will have some attributes, mainly used for searching and sorting.

  1. Required data structure - the data structure I want you to implement is a multi-tree with the following levels:
    1. Library - Level 0
    2. Author - Level 1
    3. Book - Level 2
  2. Use at least the following classes, you are free to define others in the spirit of this application.
    Specifications for a few classes - you are free to add to this list.

o    Library

-  ArrayList <Author> as an instance variable data structure

o    Author - index, a name, an address and list of a number of Books (accessed by links to instances of the Book class). 

-  ArrayList <Book> as an instance variable data structure

o    Book - index, a title, a genre, author by index

Use the ArrayList class to hold instances of the classes defined in item 1. Be sure to use generics appropriately.

Use a text data file with the following format - which you may extend, and may be extended in the later projects. As a minimum, each item should be specified by a single line in the data file. The initial fields should be used during the instantiation of objects and your program should ignore later fields that are not used. For simplicity, let us assume that the fields are separated by colons. The specifications look something like the following, where the angle brackets are not part of the actual data file. I think we can assume that name, address, title and genre are strings.

o    b:<index>:<title>:<genre>:<price>:<author_index>

o    a:<index>:<name>:<address>

Download:- Library inventory using a client-server model.rar

Reference no: EM13115810

Questions Cloud

What is the equilibrium concentration of calcium ion : A solution is prepared by adding some solid CaF2 to water and allowing the solid to come to equilibrium with the solution. The equilibrium constant for the reaction below is Kc = 3.9x10-11.
Evaluate if the ball clears the crossbar : Evaluate if the ball clears the crossbar, what is its height with respect to the crossbar when it reaches the plane of the crossbar?
Sample selection-evaluation description in business : Describe the process of selecting and evaluating a sample. Why is sampling important to business? Are there situations in business where sampling would not be effective?
Calculate the pressure of oxygen : A steel tank has a volume of 438 liters and is filled with 0.885 kg of Oxygen. Calculate the pressure of oxygen at 21 degrees Celsius.
Library inventory using a client-server model : Library inventory using a client/server model. LIMS should allow multiple clients to safely access the inventory, and using a producer-consumer model to borrow/return library items.
Continuous probability distributions-probability concepts : How may a company use probability to determine whether or not it is feasible to use primary data in a research study? Explain your answer.
Illustrate what is the name given to internal interaction : Draw a sketch that shows the distribution of dipoles in a ferromagnetic solid in zero applied magnetic field. Illustrate what is the name given to internal interaction acting on the dipoles
Difference between cost of capital and wacc : Describe the following terms and their relative importance to stock issues: IPO, underwriter, spread, prospectus, underpricing.
What mass of natural gas must burn : What mass of natural gas (CH4) must burn to emit 470. kJ of heat? CH4(g) + 2 O2(g) CO2(g) + 2 H2O(g).

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implementing ajax programming

In the AJAX scripts construct, refer to the DSN datasource as flamingo. Even though its not in your own folder or directory, it has been set up as SYSTEM DSN, so your AJAX script will have access to it.

  Explain two possible solution-fill in blank squares by words

The objective is to fill in blank squares using words from the list. Your task is to formulate problem as constraint satisfaction problem. Explain two possible solutions.

  Explain the sorting techniques selection sort

Explain the following sorting techniques using appropriate algorithms- (i) selection sort (ii) bubble sort

  Data structures used to organize typical file cabinet

Recognize at least two data structures which are used to organize typical file cabinet. Why do you feel it is essential to emulate these types of data structures in computer program?

  Find terminal nodes in tree nil if pointer is represented

The node's right child. If the nil pointer is represented by 00 and the tree's root pointer contains 53, how many terminal nodes are in tree?

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Creating sql statements

Create three SQL statements: the 1st statement should add pending amounts to appropriate accounts, the second statement should subtract the pending amounts from appropriate accounts,

  Create a flowchart to determine the cause of problems

Assume you are the 1st level help desk technician at a average sized corporations. Your job is to handle the initial calls from corporation  computer users with personal computer related problems.

  Multiple choice - high school excel 2003

Cell E23 has a date value and you want to place that date on an invoice prefaced with the text located in B15. Determine the command to do that?

  Graph in which every node is pivotal for at least two nodes

Give an example of a graph in which every node is pivotal for at least two di fferent pairs of nodes. Explain your answer.

  Creating an exception class and applet file

Create an applet document that prompts the user for an ID number and an age. Construct an Exception class and throw an Exception of that class if the ID is not in the range of valid ID numbers.

  Analyzing the use of databases

Create a paper analyzing the use of databases in your company. Include what database applications are used. Conclude through proposing improvements.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd