Below you will fins a list of of java exercises that should be completed as soon as possible. Send the code when finished.

Below you will fins a list of of java exercises that should be completed as soon as possible. Send the code when finished.

1. Write a program that defines at least two classes: Book and Library. The program should allow users to add books to the library, see a list of all books in the library, remove books from the library, edit books in the library, find the price of a book in the library, find the average price of the books in the library.

Don't use plagiarized sources. Get Your Custom Essay on
Below you will fins a list of of java exercises that should be completed as soon as possible. Send the code when finished.
Just from $13/Page
Order Essay

2. Write a program that allows the users to enter a set of strings and stores them in an ArrayList in alphabetical order. Once the user is done entering strings, the program prints: (1) the strings in alphabetical order, (2) the average length of the strings, (3) the total number of strings entered, (4) the longest and the shortest string entered.

3. Write a program that defines a class LightBulb and a class Apartment. A light bulb is defined by the number of Watts and an on/off switch. The class apartment is defined by a name and a list of LightBulb. Write an ApartmentClient that creates a couple of apartments, prints them and indicates “the apartment is dark” if all light bulbs in the apartment are off, or “there is light in the apartment” if at least one light bulb is on in the apartment.

Still struggling to complete your homework?
Get instant homework help from our expert academic writers!