Question: Java Programming Assignment #7: Literary Objects This assignment incorporates object-oriented programming techniques. While you may choose to add more to your classes, you must have

 Java Programming Assignment #7: Literary Objects This assignment incorporates object-oriented programming

Java Programming Assignment #7: Literary Objects This assignment incorporates object-oriented programming techniques. While you may choose to add more to your classes, you must have the following at a minimum: 1. Write a Java class Author with following features: Fields: firstName, lastName Constructor: accepts and initializes firstName and lastName Methods: setFirstName, setLastName, getFirstName, getLastName, toString which returns authors name as a String (formatted however you like) 2. Write a Java class Book with following features: Fields: title, author of type Author as created above), price Constructor: accepts and initializes title, author of type Author as created above), and price Methods: setTitle, setAuthor, setPrice, getTitle, getAuthor, toString which returns the book's details as a String (formatted however you like) 3. Write a separate class BookTest with a main() method which: - creates a Book titled Java Solutions with author Mo Programs, priced at 34.99 - prints the Book's string representation to standard output (using System.out.println)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!