Page 1 of 1

Use JAVA, please

Posted: Thu May 05, 2022 1:13 pm
by answerhappygod
Use JAVA, please
Use Java Please 1
Use Java Please 1 (90.39 KiB) Viewed 23 times
3 / 7 100% + SP22 CPS 2231 Assignment 5 Prof. Yongfu (Relic) Wang Task 2 (Author and Book Classes): Based on the given UML diagrams and descriptions, please implement two public classes: Author and Book Classes. For submission, place directly zip these two classes file into a .zip package. You may refer to the zip instruction: https://support.microsoft.com/en- us/windows/zip-and-unzip-files-8d28fa72-f2f9-712f-67df- f80cf89fd4e5#:_text=Press%20and%20hold%20(or%20right, then%20type%20the%20new% 20name. Author No default values for the variables -name:String -email:String +Author(name: String, email:String) +getName(): String +getEmail(): String +setEmail(email:String):void #tostring():String "Author(name=?, email=?]" Book -isbn:String
3 / 7 100% + Book -isbn:String -name: String -author:Author -price:double -qty:int = 0 +Book(isbn: String, name:String, author:Author, price:double) +Book(isbn:String, name: String, author:Author, price:double,qty:int) +getISBN): String +getName(): String +getAuthor(): Author +getPrice(): double +setPrice(price: double):void +getoty(): int #setoty(gty:int):void +getAuthorName(): String +tostring():String. "Book[isbn=?,name=?, Author [name=?, email-1.price=?,qty=?]" You need to reuse Author's tostring(). You may use following test program to test your class: public class TestAuthor Book public static void main(String[] args) {