Files
G4G0-1/Semester 1/Programming 1/Java/examples/projects/chapter02/book-exercise/Book.java
2024-01-15 20:14:10 +00:00

27 lines
564 B
Java
Executable File

/**
* A class that maintains information on a book.
* This might form part of a larger application such
* as a library system, for instance.
*
* @author (Insert your name here.)
* @version (Insert today's date here.)
*/
class Book
{
// The fields.
private String author;
private String title;
/**
* Set the author and title fields when this object
* is constructed.
*/
public Book(String bookAuthor, String bookTitle)
{
author = bookAuthor;
title = bookTitle;
}
// Add the methods here ...
}