1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergeu [11.5K]
2 years ago
10

Write a class called Date that represents a date consisting of a day, month, and year. A date object should have the following m

ethods: public Date(int day, int month, int year) -- Constructs a new Date object to represent the given date public int getDay() -- returns the day value of this date public int getMonth() -- returns the month value of this date public int getYear() -- returns the year value of this date public void addDays(int days) -- Moves the Date object forward in time by the given number of days public int daysTo(Date other) -- Returns the number of days between this Date and the other Date public boolean isLeapYear() -- Returns true if the year of this Date is a leap year. A leap year occurs when the value of the year is divisible by 4, except when it is divisible by 100 and not 400 (so 1700, 1800, and 1900 are not leap years) public String toString() -- returns a String representation of this date in the form day/month/year Write a program in which to test your class. This program should prompt the user to enter the days, months, and years of two separate dates, and then print out the number of days between these two dates.
Computers and Technology
1 answer:
Inessa [10]2 years ago
7 0

Answer:

No

Explanation:

Because it's years and its also very public

You might be interested in
A technician configures a switch with these commands:SwitchA(config)# interface vlan 1 SwitchA(config-if)# ip address 192.168.1.
yanalaym [24]

Answer:

SVI (Switched Virtual Interface)

Explanation:

For a switch to have an IP address, a switch virtual interface must be configured. This allows the switch to be managed remotely over the network.

5 0
2 years ago
The right of workers to seek safety and health on the job without fear of punishment is spelled out in:
mr Goodwill [35]
The answer to the question is C.
3 0
3 years ago
How do I delete my account on Brainly? It says I must enter my password to do so, but I never set up a password. When I try the
Lady_Fox [76]
Try using your email account password
8 0
2 years ago
How long does a baby dolphin stay with its mum
g100num [7]
The nursing usually takes up to 18 months, i.e. one year and a half.

The baby dolphin may however remain with his mum for up to 3-6 years.
5 0
2 years ago
Which of the following groups would an animal with an exoskeleton, segmented body, and jointed appendages belong to???
Annette [7]
All arthropods have exoskeletons, like insects, spiders and crustaceans.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Is a network traffic management device used to connect different network segments together?
    9·1 answer
  • A restaurant bill comes to $28.35. Find the total cost if the tax is 6.25% and a 20% tip is left on the amount before tax.​
    6·1 answer
  • Search the internet for news of a motor vehicle collision in your community involving drugs or alcohol. Keeping in mind that you
    8·1 answer
  • On the Insert tab, select Table > _______ to create a table from selected text.
    14·1 answer
  • How to build an arch bridge​
    5·1 answer
  • Why should you need to have skills and an understanding about programming?
    8·1 answer
  • Your sister is considering purchasing a tablet computer that utilizes RT as the
    11·1 answer
  • I need neveahbowe to see this.
    10·1 answer
  • HELP PLEASE !!!!!!!!!!!! Amy needs to ensure that she can enter a parameter that will match the values End, deadend, and flatend
    8·1 answer
  • Have some points part 6<br>anyone know how to change my username?​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!