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

  Write a pseudocode statement

Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. Don't use integer as decimal places will be needed.

  Describe the social implications of gaming

Within 500 words, describe the social implications of gaming. Besides entertainment, think of other aspect of our society that can be affected by gaming.

  Creating an oracle

The clique problem itself is NP-hard. Thus you may not wish to have an oracle that runs in exponential time. Consider approach to approximate the solution.

  Write one java statement that creates an array of integers

Write one Java statement that creates an array of integers containing the multiples of 10 between 10 and 100, including 10 and 100.

  Container that holds the water

The container that holds the water for the football team is 3/10 full. After pouring in 11 gallons of water, it is 4/5 full. How many gallons can the container hold

  Explain traffic control devices to alert drivers

Are all intersections located safely with respect to horizontal and vertical alignment? Where intersections happen at end of high-speed environments (e.g., at approaches to towns); are there traffic control devices to alert drivers?

  Find and display the largest of a list of positive numbers

solve the problem by using raptor. Find and display the largest of a list of positive numbers entered by the users. The user should indicate that he/she has finished entering numbers by entering a 0.

  In the style li b {color: blue}, b is the ____ element.

In the style li b {color: blue}, b is the ____ element.

  Create a new table using the column structure

Create a new table using the column structure - From the l_foods table, list the description and price values of the following foods: hamburger, french fries, and soda.  Sort the rows by description.

  Why ratings for high quality pages must all get same rating

Ratings for high quality pages should all get the same rating. For example, a high quality page for a common interpretation of the query should get the same rating as a high quality page for a minor interpretation of the query.

  Write an instruction sequence to swap the upper four bits

Write an instruction sequence to swap the upper four bits and the lower four bits of accumulator A(swap bit 7 with bit 3, bit 6 with bit 2, and so on).

  Consider a hypothetic experiment

One of the most widely used applications of spectroscopy is for the quantitative determination of the concentration of biological molecules in solution. The absorbance of a solution.

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