Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Create a class with a method. The method has to decide whether a given year is a leap year or not. a. Note: A
2. Create a class with a method. The method has to decide whether a given year is a leap year or not. a. Note: A year is considered a leap year if: i. It has an extra day i.e. 366 instead of 365. ii. It occurs every 4 years e.g. 2008, 2012 are leap years. iii. For every 100 years, a special rule applies - 1900 is not a leap year but 2000 is a leap year. In those cases, we need to check whether it is divisible by 400 or not
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