Create a librarymaterial class

Assignment Help Computer Engineering
Reference no: EM131986041

Assignment

I'm creating a Library simulation in Java. My current code has a Book class that stores the book information, BookCopy class that handles copies of the book, LibraryCard class that handles the checkout, list of books checked out, due dates, etc. I need to make the following changes to the program.

Create a LibraryMaterial class. Each LibraryMaterial consists of a title and an ISBN.* LibraryMaterialCopy has a library card and due date, they DO NOT contain a LibraryMaterial. Instead, declare LibraryMaterialCopy an abstract class.

What sort of LibraryMaterials does the library have?

* Books. These have the same basics as a LibraryMaterial, plus an author.

* DVDs are NOT Books (for starters, they don't have authors). They areLibraryMaterials, and they have a "main actor" .

For each type of LibraryMaterial, there is also a copy class -- Book and BookCopy, DVD and DVDCopy.

LibraryMaterialCopy is an abstract class. The reason behind this is because there's no such thing as a LibraryMaterialCopy; it must be either a Book or a DVD. So LibraryMaterial is in charge of all basic functionality for checking in and out, but is not associated with a specific LibraryMaterial at the superclass level.

The abstract LibraryMaterialCopy class should have an abstract method, getLibraryMaterial() which will return either a Book or a DVD, depending on the subclass. You may also have abstract getTitle() and getISBN().

In addition to all of the standard methods needed for accessing data and checking out / checking in / renewing / etc., each class should have a print method.

LibraryMaterials (and all superclasses) should print all of the basic information: ISBN, title and (if any): author, main actor.

LibraryMaterialCopy should print LibraryCard checked out to and dueDate.

BookCopy and DVDCopy should print all of the details of the Book/DVD plus the LibraryCard and dueDate.

Print to standard output. The only time that you should do that in a class is within a print() method.

To make matters more complicated, the library has set the following rules for checking out materials:

1. Overdue fines for books are $.10 per day, $1.00 per day for DVDs. An abstract getFinePerDay() method.

2. Books are checked out for three weeks. DVDs are checked out for only two weeks. An abstract getBorrowingPeriod() method.

3. Books are renewable for two weeks. DVDs may not be renewed.

The LibraryCard class should not have any additional functionalities, but will need to be changed to accommodate the changes to the library materials. Please think carefully about the inheritance hierarchy and polymorphism.

Attachment:- Code.rar

Reference no: EM131986041

Questions Cloud

Incremental cash flows and present values : Calculate the following from the data below - incremental cash flows-present values-NPV (net present value)-IRR.
Write a program that fulfills the requirements specified : Write a program that fulfills the requirements specified here: Read and parse the "From" lines and pull out the addresses from the line.
Do you think that more multi-housing-apartment complexes : 1. Do you think that more multi-housing/apartment complexes should be smoke-free? Discuss why or why not.
Finite math given that said student is taking history : The randomly selected student is taking Finite Math given that said student is taking History
Create a librarymaterial class : Create a LibraryMaterial class. Each LibraryMaterial consists of a title and an ISBN.* LibraryMaterialCopy has a library card and due date.
Present descriptive statistics of variables remuneration : MAE256 - Analytical Methods in Economics and Finance - Regression Models using Cross Section Data -Present the descriptive statistics of variables remuneration
Why is learning to control their impulses important : Do you agree with Psychologist Walter Mischel (who did the original Marshmallow Test) that "self control is the engine of success"?
Conduct an experiment in which you break a folkway : Conduct an experiment in which you break a folkway, a norm governing everyday behavior, and answer a series of response questions applying concepts.
Briefly describe the public health problem and the policy : This assignment will allow you to examine a public health policy and understand the factors that led to the creation of the policy.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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