-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A perfect day #10
Labels
Fundamentals
Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc
Very Easy
Difficulty Level - Very Easy
Comments
mohayemin
added
Very Easy
Difficulty Level - Very Easy
Fundamentals
Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc
labels
Mar 20, 2020
ratulMahjabin
added a commit
that referenced
this issue
Mar 21, 2020
wasiulhaque
added a commit
that referenced
this issue
Mar 28, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Fundamentals
Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc
Very Easy
Difficulty Level - Very Easy
Overview
Your astronomer friend has recently observed a "perfect planet". Everything about the motion of the planet seems very perfect.
A day, called a "perfect day", on the planet is equal to exactly 16 earth hours. It has just one moon, called the "perfect moon", that rotates around it in exactly 32 days. The planet rotates around the "perfect star" in exactly 256 perfect days.
Your friend wants you to build a simulation software for the perfect planet. To begin with, you are requested to make date and time simulations for the planet.
Task
PerfectDate
class that represents a perfect day of the perfect planet.PerfectDate
class should have ayear
, amonth
and adate
.PerfectDate
class must be immutable, that means that the values of the PerfectDate cannot be changed after initialization.PerfectDate
class should have a methodnextDay
that should return the next day of the perfect calendar.Example
The examples are in yyyy/MM/dd format.
1813/01/03
is1813/01/04
1813/01/32
is1813/02/01
1813/08/32
is1814/01/01
Reminders
The text was updated successfully, but these errors were encountered: