Question
Create this assignment using Java. You are tasked with building a BookStore. Your Architect has told you that the BookStore class has the following members
Create this assignment using Java. You are tasked with building a BookStore. Your Architect has told you that the BookStore class has the following members :
long id;
String name;
Address address;
Book book;
The Address class has the following attributes :
String streetName;
String houseNumber;
String apartmentNumber;
String zipCode;
The book class has the following members
String name;
String isbn;
Author author;
The Author class within the book class has the following member :
String firstName;
String lastName;
Date dateOfBirth;
Address address; //Address class has already been created
You have to create your BookStore class. You have to use encapsulation to make sure all the variables of the bookstore class are protected.
For the classes that are within the bookstore class (Address and Book and Author within book) you have to use encapsulation as well for the member variables.
Now you need to create another class that will have a main method. Call this class App. Populate your vaariables with data using the setter methods and then print them out using System.out.println
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started