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

  Why are most programs yet in cobol

Leibs, (2008) reported on a novel form of outsourcing software development. express the approach and share your thoughts about this new approach to software development.

  How to display the sorted data

Using Java write down a program to create a file named Exercise8_5.txt if it does not exist. Write 100 randomly created integers into the file using text I/O. Integers are separated by spaces in the file. Read the data back from the file and displ..

  Wireless networking

Explain the origins/genesis of the wireless networking. Explain the devices included used and how they operate.

  Plan a simple system, than draw a context data

however your friends tease you about it, you are an unabashed collector of vintage folk songs from the 1950's and 1960's. Your collection now totals several thousand recordings in various formats. To help keep better track of the recordings

  Make a class for services offered by a hair-styling salon

make a class for services offered by a hair-styling salon. Data fields include a String to hold the service description (for example, "Cut", Shampoo", or "Manicure"), a double to hold the price, and an integer to hold the average number of minutes..

  Describe what you consider to be some attributes

explain what you consider to be some attributes of a well-written program. What would you look for when reviewing a programmer's code during a quality assurance review.

  Algorithm to prepare a job applicant report

Develop an algorithm in order to prepare a job applicant report. Input consists of a series of records that contain the Social Security number or equivalent, last name, first name, middle initial, verbal test score, science test score, math test s..

  Implementing the code

Write down a complete program which declares an integer variable, reads a value from the keyboard into that variable. Write down a program which determines the mileage reimbursement for the salesperson at a rate of $.35 per mile.

  Describe where sequential file processing might be used

Develop an case to illustrate your definition. (The example does not have to be as elaborate. Just a record with a simple explanation)

  Requirements for telecommunications planning

Discuss what do you understand by the general estimate requirements for the enterprise telecommunications planning and also explain in detail the cable estimating procedures.

  Express the scope of the project

Define the scope of the project. Create a detailed outline for each section

  Explain how css are used in developing websites

explain how CSS are used in developing websites.

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