fifle: String - pages: int - author: String Book(String t, in + getTitle (): Strir + getNumbero + getAuther(): S + setTitle (t: String + setNumPages + setAuther(a: S + printTitle (): voi

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Answer in java
3. Create a java class as the following diagram and make some objects and print outputs
Book
- title: String
pages: int
- author: String
Book(String t, int pg. String auth)
+ getTitle (): String
+ getNumberOfPages(): int
+ getAuther(): String
+ setTitle (t: String):void
+ setNumPages(n: int): void
+ setAuther(a: String): void
+ printTitle (): void
+ printNumPage(): void
+ printAuther(): void
| + printAll(): void
Transcribed Image Text:3. Create a java class as the following diagram and make some objects and print outputs Book - title: String pages: int - author: String Book(String t, int pg. String auth) + getTitle (): String + getNumberOfPages(): int + getAuther(): String + setTitle (t: String):void + setNumPages(n: int): void + setAuther(a: String): void + printTitle (): void + printNumPage(): void + printAuther(): void | + printAll(): void
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning