Write a checkout class that stores a three digit patron id

Assignment Help Basic Computer Science
Reference no: EM13322238

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: EM13322238

Questions Cloud

What is the total energy stored in the electric field : A 2.55-cm-diameter parallel-plate capacitor with a spacing of 0.38 mm is charged to 300 V. What is the total energy stored in the electric field
The city of holland issued bonds : The City of Holland issued bonds
Explain a structural formula and then indicate the uv region : For each of the compounds below, first write a structural formula and then indicate which of them is likely to absorb in the UV region. Briefly explain your reasoning. A. cyclohexanol B. 2,4-hexadienal C. 2-methyl-5-vinylpyridine
Find the total head loss if the flow velocity is 4 fps : one open globe valve, one medium-radius elbow, and one 90 degrees pipe bend (kb=0.13) with a radius of curvature of 45 in. The length of the bend is not included in the 110 ft.
Write a checkout class that stores a three digit patron id : 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.
What is the angle made by the thread with the vertical axis : The electric field between the plates of a parallel plate capacitor is horizontal, uniform, and has a magnitude of 3.5*10^4 N/C. What is the angle made by the thread with the vertical axis
Determine what is the submerged discharge head loss : What is the submerged discharge head loss. By what percentage is this loss reduced if the provision of a draft tube increases the discharge flow area to six times the size.
Find the magnitude of the force acting on any one of charge : A square with sides of length L=.1 m has a point charge of 2 microC at each of its four corners. Find the magnitude of the force acting on any one of the charge
A recent purchase of merchandise : LBJ Company recorded the following events involving a recent purchase of merchandise

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the 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