Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your program has the following relationships between the objects you plan to cre

ID: 3831166 • Letter: Y

Question

Your program has the following relationships between the objects you plan to create the program. A hotel room is a room, a suite is a hotel room, the presidential suite is a suite, and a bathroom is a room. What real-world object should be the parent class? hotel room suite room presidential suite Use the code written below to answer the question. What elements are by the class ReferenceBook? public class Book {private String author, private String title: public String isbn; public int numberOfPages public Book(String t String a String i, int n) {title = t: author = a isbn = i; numberOfPages = n:} public getAuthor() {return author} public getTitle() {return title:} private String getBookString{) {return title + + author + M [ISBN. " + isbn +} public class ReferenceBook extends Book {} isbn (field) getBookString (method) author (field) getAuthor (method) getTitle (method) numberOfPages (field) title (field)

Explanation / Answer

What would be the object in the parent class:

hotel room, it is the real object in parent class

Question8:

What element are inherited by the class ReferenceBook?

These are inherited by the RefrenceBook class. Because a subclass can extract all methods,fields and nested classes that are in superclass but not extract constructor.Here public Book{ is the constructor of super class.