Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer as soon as possible. Using Java create the following classes below. Date Create a class called Date , with private instance variables, accessors,

Please answer as soon as possible.

Using Java create the following classes below.

Date Create a class called Date, with private instance variables, accessors, mutators, and constructor parameters for the following data: year, month, day (all ints). It also has a method called getDate() which returns a String in the format of yyyy-mm-dd.

Book Create another class called Book, with private instance variables, accessors, mutators, and constructor parameters for the following data: title (a String) and datePublished (a Date). It also has a second constructor, which takes the title (String), year, month, and day (ints) as parameters.

BookStore Create a class called BookStore with an ArrayList of five ArrayList Book references; use both Book constructors when populating the ArrayList. Also create an Array of the same five Book references.

Create a method called displayBooks which displays the title and getDate() data for all the books in the ArrayList (use an iterator) and in the Array (use a for-each loop).

And Obviously a Main class(tester).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

7. Determine what feedback is provided to employees.

Answered: 1 week ago