In: Computer Science
in JAVA please
Some of the characteristics of a book are the title, authors, publisher, ISBN, price, and year of publication. Design the class Book so that each object can hold the following information about a book: title, up to four authors, publisher, ISBN, price, and number of copies in stock. To keep track the number of authors, you can add a variable; Including the methods to perform various operations on the objects of book. For example, the usual operations that can be performed on the title are to show the title, set the title, and check whether a title is an actual title of the book. In the similar way, the typical operations that can be performed on the number of copies in stock are to show the number of copies in stock, set the number of copies in stock, update the number of copies in stock, and return the number of copies in stock. Add similar operations for the publisher, ISBN, book price, and authors. Add the appropriate constructors. Write the definitions of the methods of the class Book based on the instruction in a). Write a program that uses the class Book and test various operations on the objects of class Book. Say declare an array of 100 components of the type book. Some the operations that you should perform are to search for a book by its title, search by ISBN, and update the number of copies of a book.
In: Computer Science
NOTE: This assignment is for
the design only
Nothing you turn in should look like C/C++ code
For this assignment, we are going to design a system to Manage
loans from the local public library
For this, we will need the following
entities, plus collections for each of the
entities: Patrons, Books, and Loans
The data for a Book will contain at
least the following:
Author
Title
ISBN Number
Library ID number
Cost
Current Status (In, Out, Repair, Lost)
You may add other data needed for your implementation as well as you will need accessor and mutator functions for the data.
The data for a Patron will contain at least:
Name (e.g. Fred Smith)
ID number (6 digits e.g. 123456)
Fine Balance
Current # of books out
You may add other data needed for your implementation as well as
you will need accessor and mutator functions for the data.
The data for a Loan (The transaction entity) will contain at least
the following:
Loan ID
Book ID
Patron ID
Due Date and Time
Current Status (overdue, normal)
You may add other data needed for
your implementation as well as you will need accessor and mutator
functions for the data.
For the collections of each of the Patrons and Books Classes
identified above, you will need to include the ability to:
Add
Edit
delete
Search/Find based on appropriate criteria
Print a list of all entries in the collection
Print the details for a single entity (do a find first)
Other methods you may identify
For Loans you will need:
Check Out a book (update book and
patron info as well as add a loan)
Check in a book (check for fines and update patron and book info
and delete loan)
List all overdue
List all books for a particular patron
Update loan status based on the system clock
Re-Check a book
Edit a loan
Report lost (update book and charge patron book cost as well)
Other methods you may identify
You will need to verify the following
You will need to provide an appropriate menu system that can be multi-level if you like.
Do not attempt to provide card catalog services for allowing patrons to search for books. You may assume each book has a unique acquisition number, and you may use these numbers to refer to books borrowed and returned.
You will need to load and store the data. This can be done automatically when the program starts and ends. You should also want to store after an add, delete or edit to make sure changes to the data are preserved.
You can assume the following
Loan period is 10 days with an additional recheck of 10 days (1 recheck only)
A max of 6 books can be out to a single patron at a time
Fine rate is $0.25 per day (24 hour period)
For this design you will need to turn in the following:
A diagram set consisting of:
All of these items should be gathered together, in order, in a single PDF file.
NOTE: This assignment is for
the design only
Nothing you turn in should look like C/C++ code
In: Computer Science
complete this code for me, this is java question.
// Some comments omitted for brevity
import java.util.*;
/*
* A class to demonstrate an ArrayList of Player objects
*/
public class ListOfPlayers
{
// an ArrayList of Player objects
private ArrayList players;
public ListOfPlayers()
{
// creates an empty ArrayList of Players
players = new ArrayList<>();
}
public void add3Players()
{
// adds 3 Player objects
players.add(new Player("David", 10));
players.add(new Player("Susan", 5));
players.add(new Player("Jack", 25));
}
public void displayPlayers()
{
// asks each Player object to display its contents
// - what if the list is empty?
for (Player currentPlayer : players)
currentPlayer.display();
}
// Q.4(a) for Week 8
public void clearPlayers()
{
/* Add code to clear all the Player objects from the
ArrayList
* (ie. the list will be emptied after the operation)
*
* Hints:
* - display the list before AND after the operation to check
* if it was performed correctly
*/
// wrote your code here...
players.clear();
}
// Q.4(b) for Week 8
public void addPlayer()
{
/* Add code to ask user to input a name and a position,
* then use the data to add a new Player object into the
* players attribute.
*
* There is no need for any input validations.
*
* Hints:
* - use a Scanner to get user inputs
* - create a new Player object
* - use the add() method of the ArrayList class to add it into the
list
*/
// wrote your code here...
}
// Q.4(c) for Week 8
public int findPlayer(String name)
{
int index = -1;
/* Add code to allow user to search for an existing Player
object
* in players. The parameter is a string representing the name
* of the Player object to search. The return value is the
index
* where the object is found, or -1 if the object is not
found.
*
* Assume there are no duplate names in the list.
*
* Hints:
* - use a loop to search through the ArrayList
* - compare the given name to each Player's name in the list
* - use the indexOf() method to return the required index
*/
// wrote your code here...
return index;
}
// Q.4(d) for Week 8
public boolean updatePlayerName(int index)
{
boolean success = false;
/* Add code to allow user to modify an existing Player object
* in players. The parameter is the index to the Player object
* in the ArrayList. Your code should first check if the given
* index is within the correct range (between 0-max, where max
* if the ize of the list. If the index is not valid,
* or the player list is empty,
* print out an error message, otherwise ask the user to input
* a new name and update the Player object with that name.
* If the update operation is successful, return true
(otherwise
* return false).
*
* Hints:
* - check if index is valid and list is not empty
* - if yes, use it to get at the correct Player in the list
* - update the Player's name
* - return the appropriate boolean result
*/
// wrote your code here...
return success;
}
// *** Pre-tute Task 1 for Week 9 ***
public boolean removePlayer(String name)
{
boolean success = false;
/* Add code to allow user to remove an existing Player object
* in players. The parameter is the name of the Player object
* to be removed. Your code should first check if th object
* with that name does exist.
*
* Your code *MUST* make a call to the findPlayer() method you
* wrote in Q.4(c) above.
*
* If the remove operation is successful, return true
(otherwise
* return false, and print a simple error message).
*
* Hints:
* - use the findPlayer() method to find the position of the
object
* - remove the Player if it exists
* - return the appropriate boolean result
*/
// wrote your code here...
return success;
}
// *** Pre-tute Task 2 for Week 9 ***
public boolean updatePlayerName(String oldName, String
newName)
{
boolean success = false;
/* Add code to allow user to modify an existing Player object
* in players. This time the method takes 2 parameters:
oldName
* is the name for an Player object to be searched for,
newName
* is the name to update the object with. Your code should
first
* check if the object with the oldName does exist.
*
* Your code *MUST* make a call to the findPlayer() method you
* wrote in Q.4(c) above.
*
* If the update operation is successful, return true
(otherwise
* return false, and print a simple error message).
*
* Hints:
* - use the findPlayer() method to find the position of the
object
* - update the Player's name with the given parameter
(newName)
* - return the appropriate boolean result
*/
// wrote your code here...
return success;
}
}
In: Computer Science
______________ reinsurance is referred to as "obligatory" reinsurance while ______________ reinsurance is referred to as "non-obligatory" reinsurance. proportional; non-proportional treaty; facultative non-proportional; proportional facultative; treaty
In: Finance
The following transactions apply to Hooper Co. for 2018, its first year of operations:
| HOOPER CO. | ||||||||||||||||||||
| Horizontal Statements Model | ||||||||||||||||||||
| Event No. | Assets | = | Equity | Income Statement | Statement of Cash Flow | |||||||||||||||
| Cash | + | Accounts Receivable | – | Allowance for Doubtful Accounts | + | Notes Receivable | + | Interest Receivable | = | Common Stock | + | Retained Earnings | Revenue | – | Expense | = | Net Income | |||
| 1. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 2. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 3. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 4. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 5. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 6. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 7. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| 8. | not attempted | + | not attempted | – | not attempted | + | not attempted | + | not attempted | = | not attempted | + | not attempted | not attempted | – | not attempted | = | not attempted | not attempted | not attempted |
| Total | 0 | + | 0 | – | 0 | + | 0 | + | 0 | = | 0 | + | 0 | 0 | – | 0 | = | 0 | 0 | |
| HOOPER CO. | ||
| Income Statement | ||
| For the Year Ended December 31, 2018 | ||
| not attempted | not attempted | |
| Operating expenses | ||
| not attempted | not attempted | |
| not attempted | not attempted | |
| not attempted | not attempted | |
| Total operating expenses | 0 | |
| not attempted | not attempted | |
| Non-Operating Items | ||
| not attempted | not attempted | not attempted |
| not attempted | not attempted | not attempted |
| not attempted | ||
| HOOPER CO. | ||
| Balance Sheet | ||
| As of the End of the Year 2018 | ||
| Assets | ||
| not attempted | not attempted | |
| not attempted | not attempted | |
| not attempted | not attempted | 0 |
| not attempted | not attempted | not attempted |
| not attempted | not attempted | not attempted |
| not attempted | not attempted | not attempted |
| Total assets | 0 | |
| Liabilities | not attempted | |
| Stockholders’ equity | ||
| not attempted | not attempted | |
| not attempted | not attempted | |
| not attempted | not attempted | |
| Total stockholders’ equity | 0 | |
| Total liabilities and stockholders’ equity | $0 | |
In: Accounting
________ will ALL increase a company's capital dividend account.
Choose the correct answer.
A. Life insurance proceeds, net capital gains, and the additional refundable tax on investment income (ART)
B. Stock dividends received from other corporations, non-taxable life insurance proceeds & non-taxable portion of capital gains
C. Capital dividends received from other corporations, non-taxable life insurance proceeds & non-deductible portion of capital losses
D. Capital dividends received from other corporations, non-taxable life insurance proceeds & non-taxable portion of capital gains
In: Accounting
Janette invested $2000 at 5% compounded annually for 5 years. How much interest did she earn at the end of the 5 year period?
In: Math
Explain the recent changes in the Federal Reserve's Open Market Operations since the year 2000.
What are the principal economic goals of the Federal Reserve System?
In: Economics
In: Economics