Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9901720

Have any Question?


Related Questions in Computer Engineering

Na2co3 caoh2 -------gt 2naoh caco3cao h2o ------gt

Na2CO3 + Ca(OH)2 -------> 2NaOH + CaCO3 CaO + H2O ------> Ca(OH)2 What weight in kg of NaOH will be generated if 26.5kg of soda ash is used? How many kg of lime is needed for the reaction?

Recently the discovery of a new data structure wonder heap

Recently, the discovery of a new data structure WONDER HEAP was announced. A WONDER HEAP has the same functionality and worst case behaviour as a binary heap except for DELETE MAX, which is implemented in O(log log n) (i ...

Taskwrite an essay according to the following

Task Write an essay according to the following instructions. Your lecturer will provide few links for relevant articles and/or case studies. These will be available to you just after your second assignment submission dat ...

For recursion trees why sometime there are 2 recursion

For recursion trees, why sometime there are 2 recursion trees shown. why sometimes the work per level decreases from level to level, and it is constant in each level. The recursion tree shown for merge sort has same tota ...

A sample of 1000 us households is taken and the average

A sample of 1,000 U.S. households is taken and the average amount of newspaper garbage or recycling is found to be 27.8 pounds. Assuming the standard deviation of newspaper for garbage or recycling is 2 pounds. Estimate, ...

Is smartart graphic and table slide important for

Is Smartart graphic and Table slide important for PowerPoint Presentation? How would it benefit?

Need a use case diagram for a case studythe case studypaul

Need a use case diagram for a case study: The case study Paul is the Director of IT Services for a consulting firm Avant. The firm has been growing fast since it was launched in 2010. With over 100 employees and hundreds ...

Are us executives paid too much particularly compared to

Are U.S. Executives paid too much particularly compared to the average worker in their organization?

Assignment 1 project proposalyou have been selected to be

Assignment 1: Project Proposal You have been selected to be the project manager (for a project of your choice). The project that you decide to use should meet all the key criteria of a project as outlined in the PMBOK, s ...

What are some differences between transaction processing

What are some differences between Transaction Processing Information Systems and Management Information Systems?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As