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

  Find out a sequence of activities

Outline the considerations for systems investigation.

  Imagine that a doubly linked list "header"

Assume that a doubly linked list "header" stores the elements of a priority queue. make use of the function pop(), which deletes the element with the largest value from the list (priority queue).

  How the smallest word is at offset 0000

Sort all the words in memory that could be considred to be decimal ASCII-coded numbers. An ASCII-coded word can vary from 3030h (00d) to 3939h (99d). Sort the ASCII words so that the smallest word is at offset 0000.

  Explain a mitigating strategy for the risks

Briefly identify and describe a mitigating strategy for the risks.

  What are the nine border styles make in css

define how to combine multiple border attributes into one style declaration, using the example of an 8-point red dashed border.

  Computing the total tax

In following example, second line of the table signifies that tax due on a salary of $2,000.00 is $225.00 plus 16% of excess salary over $1,500.00 (that is, 16% of $500.00). Compute the total tax.

  Write down a program that computes an average score

Write down an event procedure for the listview controls keydown event to tell the application to delete all selected records when the user presses the D key.

  Modify java application that displays the product number

make a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).

  Products were completely hardware based

Starting in 1981, designs for the Navigation Systems incorporated a microprocessor and an increasing number of integrated circuits. To support the microprocessor-based designs, Navigation Systems Inc.

  Explain working procedure for karnaugh map

describe working procedure for Karnaugh map or K-map for two-, three- and four-variable functions.

  Differences between the java programming languages

What are the main differences between the Java programming language and the language discussed

  What are the reasons of project failure

Make sure to contain how and why project was initiated, what setting up was done, how plan went wrong and what was done to solve the trouble. What are the reasons of project failure

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