Write program that librarian use to enter a book checkout

Assignment Help Computer Engineering
Reference no: EM13322418

A simple java program that track of who has checkout library books. Write a checkout class that stores a three digit patron id, a ten character string for books id, a long showing the time that the book was checked out. the class should provide output and input operations and also equal() function.

Write your class, using your class write a program that a librarian can use to enter a book checkout, remove a checkout when a book is returned, or prints out all the books on loan. check outs should be stored in a list. You have to use System.current TimeMillis() method to get the time value.

Program should read a list of checked books from a file at the start and write a list when program completes- output the same file. program should make sure that each patron can check out no more than 3 books and no book can be checkout by two patron at once.

The format for file is patron id, space, book id, space and time on 1 line per book.

Out put looks like:
---------------------------------------------------------------------
Enter file: books.txt

enter a number:
1, for check-in book
2, for checkout book
3, exit

answer: 2

Enter patron id: 555
Enter ten letter of book: lordofrin1

enter a number:
1, for check-in book
2, for checkout book
3, exit

 

Reference no: EM13322418

Questions Cloud

Design the logic that merges the two files : Design the logic that merges the two files to produce one combined name-and-address file, which the office staff can use for addressing mailings of the practice's monthly Healthy Lifestyles newsletter.
Corporate governance : Corporate governance, and agency relationships, conflicts, and costs?
Depict a newman projection : Draw a Newman projection of the most stable conformation of (2R, 3S)-dibromobutane sighting down the C2-C3 bond.
Obtain the focal length of the lens : The front, convex, surface of a lens made for eyeglasses has a radius of curvature of 12.4cm, and the back, concave, Calculate the focal length of the lens
Write program that librarian use to enter a book checkout : Write your class, using your class write a program that a librarian can use to enter a book checkout, remove a checkout when a book is returned, or prints out all the books on loan. check outs should be stored in a list.
Explain the presence of high concentration of chloride ion : The addition of bromine to ethene in the presence of high concentration of chloride ion in an inert solvent results in the formation of 1,2-dibromoethane and 1-bromo-2-chloroethane. No 1,2-dichloroethane is obtained
Accounting for health care organizations : What are some ways in which accounting for health care organizations (HCOs), especially not-for-profit (NFP) ones, tend to differ from accounting in other industries?
Explain that the solution at 35 degrees c saturated : An unknown amount of KCl was added to 250 mL of water @ 35 degrees C and formed a clear solution. The temperature was lowered to 25 degrees C, and the solution remained clear. Was the solution at 35 degrees C saturated
Considering investing in a new manufacturing plant : Braddock Industries is considering investing in a new manufacturing plant. The plant requires an item of equipment that costs $200,000. In addition

Reviews

Write a Review

Computer Engineering Questions & Answers

  Bus collision avoidance protocol

Before effective Ethernet switching existed, some network designers are used an alternative bus collision avoidance protocol termed as the token bus protocol.

  The c++ libraries on strings have many functions

The C++ libraries on strings have many functions that can be used to handle various string operations. Write a function called stringlast that can be used to find the last n characters in a string and return a pointer to this new string

  Develop a pac chart, interactivity chart

Develop a solution that will calculate the price of an item for each of the five days, given the original price. Test the solution for an item costing $10.00. Develop a PAC Chart, Interactivity Chart,IPO chart, Algorithm, and Flowchart

  Which data structure is the optimum one

When lots of inserts & deletes are involved. When you have no clue about how big the list would grow.

  Make a use of microsoft project to create a project plan

make a Use of Microsoft Project to create a project plan

  Make a java application that accepts a positive integer

make a Java application that accepts a positive integer n > 1 as a command line parameter and outputs all strictly increasing integer sequences starting with 1 and ending with n.

  Define how to use css

CSS is a very powerful tool for changing the way a webpage is displayed. It is too flexible and allows the designer to deliver HTML code to many devices without changing the markup.

  Advantages and disadvantages to using cots

What are the advantages and disadvantages to using COTS (Commercial Off-the-Shelf) software versus writing your own software within a company environment? Give some examples of problems you have had.

  How to write a program to check the collision

How to write a program to check the collision Write down a java program to check if they will collide or not. If they are going to collide print a message that 'The crafts will collide at (x,y)' where co-ordinates (x,y) are on Map as points of co..

  Define the use of databases and the benefits

define the use of databases in your organization. Include what database applications are used (Microsoft Access, DB2, Oracle, etc.). Conclude by proposing improvements.

  Developing countermeasures against dos attacks

Explain whether the administrators of server systems still have to be concerned about, and take the further countermeasures against DoS attacks, if so, what kinds of attacks may still happen, and what measures can be taken in order to decrease the..

  Security issues while users processing the database

Describe the security issues which may be encountered when the multiple users process the database concurrently.

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