Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer the questions throughout the program public class Diary{ private ArrayList myDays; } public int getNumdays() { //Question1: this method returns the number of days

answer the questions throughout the program

public class Diary{ private ArrayList myDays; } public int getNumdays() { //Question1: this method returns the number of days in the collection }public int getSunnyDayCount() { //Question2: this method wil return the number of days that are sunny } public Day findBestDay() { //question3: this method finds the best Day as defined by the days being comparable, if there are no days in the collection, return null, if the are 2 " best " days, return one of them. } public String toString() { //Question 4 : implement the tostring method.besides returning each of the days in the diary, return number of sunny days }

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