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

  What will be the date in the opening of the letter

If /home/zach/draft and /home/max/letter are links to the same file and the following sequence of events occurs, what will be the date in the opening of the letter?

  Hypothetical business engaged in e-business

Establish a target audience and scope for your presentation. Select a real or hypothetical business engaged in e-business and outline its central offerings and/or services.

  What is the use of win32 console functions

What is the use of Win32 Console functions and how they relate and pertain to GUI.

  Provide injective function from to and explain why injective

Provide an injective function from ? to ? and explain why it's injective

  Explaining physical material on which computer keeps data

Storage is the physical material on which a computer keeps data, instructions, and information?

  Display the lowest number of moves

Display the lowest number of moves it took for the mole to escape and how many times did the mole escape in that fewest number of moves?

  Design an algorithm that will prompt for and receive 10

A  flow chart for the following problem. Just a flowchart. Design an algorithm that will prompt for and receive 10 integers from an operator  at a termina

  Produce algorithm pseudocode code flowchart for problem

Produce an algorithm, pseudocode code and flowchart for the following probelm: A customer in a store is purchasing five items. Design a program that ask for the price of each item, and then displays the subtotal of the sale, the amount of sales ta..

  Write ethical issues involved in eliminating jobs in k-mart

Sears is losing market share, has been acquired by K-Mart, and is eliminating jobs; Wal-mart is gaining market share and hiring. Write ethical issues involved, and which firm has a more ethical position?

  Implementing strong password policy

How do you implement strong password policy given dilema of forgotten passwords? How would you address these issues?

  Devise an algorithm for multiplying two large numbers

Suppose you have available a pocket calculator that can multiply a four-figure number by a four-figure number and get the correct eight-figure answer

  What is the output from the following c++ code fragment

What is the output from the following C++ code fragment

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