Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use eclipse sofware for this please Create a Java class with the following properties and methods: Date class: The class and file names are both

use eclipse sofware for this please image text in transcribed
image text in transcribed
Create a Java class with the following properties and methods: Date class: The class and file names are both Date Properties: Year e.g. 2021 Month e.g. "December" Day e.g. 25 Methods: accessor methods (aka getters) e.g. returns 2021, etc getDate() method which returns a String version of the date in the form of "March 15, 1980 Calendar class: The class and file names are both Date Properties: ArrayList called years of the Integers from 1910 to 2025 (Integers) Array called months of all twelve month names (Strings: eg. "January", "February", ...) ArrayList called days of the Integers 1 to 30, inclusive (Integers) HashMap called dates whose key is an Integer and value is a Date (see below) Constructor: The constructor must do the following: Used nested loops (loop inside a loop inside a loop) as follows: Use a for-each loop to iterate through the years o Use a for loop to iterate through the months Use an iterator to iterate through the days ...to create a Date object for every date from January 1, 1910 until December 30, 2025 (each month will have 30 days) and store each Date object in the HashMap dates instance variable. January 1 1910 has key 1, January 2 1910 has key 2..., all the way up to December 30 2025 which has key 41760. Methods: COMP2501 Lab 2b Due before next of class printCalendari) prints each Date in the calendar by using the dates object's keySet() method with a for-each loop, calling the Date's getDate() method. Main class: The class and file names are both Main- Contains the main method, which creates a Calendar object and calls its printCalendar() method which gives the following output: 1: January 1, 1910 2. January 2, 1910 3: January 3, 1910 4: January 4, 1910 5: January 5, 1910 14458: February 28, 1950 14459: February 29, 1950 14460: February 30, 1950 14461: March 1, 1950 14462: March 2, 1950 14463: March 3, 1950 14464: March 4, 1950 30239: December 29, 1993 30240: December 30, 1993 30241: January 1, 1994 30242: January 2, 1994 41757: December 27, 2025 41758: December 28, 2025 41759. December 29, 2025 41760: December 30, 2025

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

Students also viewed these Databases questions

Question

Draw all possible isomers for the molecule C3H5Br.

Answered: 1 week ago