Create a book class which stores the information

Assignment Help JAVA Programming
Reference no: EM13939968

I need a complete Java code for the following beginner-level assignment. The code does not have to be pretty as long as it works... So here's the assignment:

You run a small library. Ask the user to provide information for several books. The information must include the author, title and publisher of each book. Create a book class which stores the information and implements the following methods:

getAuthor() (returns author's name)

getTitle() (returns the title)

getPublisher() (returns the publisher of the book)

Finally print all the stored information to the user.

Tip 1: Remember the constructor.
Tip 2: You can use an arraylist.

This is how it should look like:

Do you want to input a new book (y/n)?

y

Author:

Jacob Smith

Book title:

Investment Banking

Publisher:

Oxford Press

Do you want to input a new book (y/n)?

y

Author:

Mary Dickins

Book title:

Advanced Econometrics

Publisher:

London Publishing House

Do you want to input a new book (y/n)?

n

The library contains:

2 books

Books:

Jacob Smith, Investment Banking, Oxford Press

Mary Dickins, Advanced Econometrics, London Publishing House

Reference no: EM13939968

Questions Cloud

Using visual studio for pc,inside the visual c++ : Data and Code to be used for this assignment 3 are attached. Using Visual Studio for PC,Inside the Visual C++ option, we want to select a Win32 Console Application.
What type of immune cells are displayed in this plot : In advanced HIV disease the percentage of cells in which population would be reduced? What type of immune cells are displayed in this plot?
Examine your organization and leadership : What is vision in your work environment and how does one foster a shared vision in this kind of environment and what signals (verbal and non verbal) do individuals send to leaders to communicate that they are inspired?
Perspectives on food and beverage appreciation : Search the internet or Australian Hospitality Management journals for a job description for an F&B a manager in a large international hotel in Australia.
Create a book class which stores the information : You run a small library. Ask the user to provide information for several books. The information must include the author, title and publisher of each book.
Develop a program for an auto dealership : You are to develop a program for an auto dealership. This program will keep track of the auto inventory using an array of objects. The dealer has a limit of 100 cars in inventory at one time due to space restrictions. The class used to instantiate..
Characteristics of high and low voltage electrical power : Evaluate, test and report the characteristics of high and low voltage electrical power distribution networks. Identify, select, programme and test suitable power flow techniques and algorithms to solve network power, voltage and current distribution..
Explain how the overhead costs were assigned to each job : How do you think Mrs. Lucky will feel when she receives the bill for the three sets of wedding announcements? Explain how the overhead costs were assigned to each job.
Review of an employment contract : As a current or former employee, you have a "defined idea" of what makes a great workplace? This week''s assignment focuses on a review of an employment contract.

Reviews

Write a Review

JAVA Programming Questions & Answers

  User enters a list of car parts

So if the user enters a list of car parts, the programm holds this list. Afterward, when the user types in the name of the part the programm outputs that name from the list.

  Part a -code comprehensionusing the uncommented sample code

part a -code comprehensionusing the uncommented sample code has been provided in moodleanswer the following questions1.

  Write java program using array list object

Write a java program (using eclipse) using ArrayList object to allow the professor to enter student's name, his or her's four test scores.

  Create a class diagram that shows an interface

Create a class diagram that shows an interface called Buyer in the Violet UML editor. This interface should declare the methods to perform a buyer's responsibilities

  How threads are used to implement currency in java

Describe the concept of concurrency and how threads are used to implement currency in Java

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

  Negative subarrays

Write a program that displays the "Negative subarrays".Note: Subarrays are contiguous chunks of the main array. For example if the array is {1,2,3,5} then some of the subarrays are {1}, {1,2,3}, {2,3,5}, {1,2,3,5} etc. But {1,2,5} is not an subarray ..

  Write class encapsulating the concept of weather forecast

Write a class encapsulating the concept of the weather forecast, assuming that it has the given attributes: the temperature and the sky conditions, which could be sunny, snowy, cloudy, or rainy.

  How to read data in a link list

How to read data in a link list?

  Java program to store temperatures in two-dimensional array

Write the Java program which uses two-dimensional array to store highest and lowest temperatures for each month of the year. Program must output average high,average low,

  Graphics program that draws 12 strings

Write a graphics program that draws 12 strings, one each for the 12 standard colors, besides Color.WHITE, each in its own color. Provide a class ColorNameViewer and a class ColorNameComponent.

  Write an interface for a bagadt that implements iterable

Write an interface for a BagADT that implements the Iterable interface. Include javadoc comments that will generate specifications for the BagADT so that someone who wants to implement this interface will know what each method does.

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