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
The viewer of an OLAP report can change its format. Which term implies this capability?
amm1812

Answer:

The answer is "Option D".

Explanation:

OLAP reports stands for Online Analytical Processing reports, These reports provide a platform that behind many application use in Business Intelligence. and other options are incorrect that can be described as follows:

  • In option A, It is used to store the data into the OLAP report, that's why it is not correct.
  • In option B, It is software that is used for analytics data, that's why it is not correct.
  • In option C, It is used for finding index values in the 2D array that's why it is not correct.
3 0
3 years ago
Read 2 more answers
Write a Python 3 program that will compute the total cost of an amazon purchase. The program should ask the user to enter the am
valentina_108 [34]

Answer:

price = float(input("Enter amount of a purchase: "))

shipping_price = 0.12* price

NJ_sales_Tax = 0.07*price

print('The price of item is {}'.format(price))

print('The Cost of Shipping is {}'.format(shipping_price) )

print('New Jessey Sales Tax is {}'.format(NJ_sales_Tax))

total_bill = shipping_price+NJ_sales_Tax+price

print('Total Bill {} ' .format(total_bill))

Explanation:

  • Prompt User for input of the amount of purchase
  • Calculate the shipping cost (12% of purchase price)
  • Calculate the tax (7% of the purchase price)
  • Use python's .format method to output an itemized bill

3 0
3 years ago
Do these devices allow you to view photos using the cloud?
ivann1987 [24]

Answer:

Yes, You can view the cloud on those devices

8 0
3 years ago
Explain 5 documents that can<br>be created by using<br>ms word?​
arlik [135]
I don’t understand? What you mean by that
4 0
2 years ago
Read 2 more answers
Kylie lives near a beautiful beach and has grown up surfing the waves. Many families come to visit her area and Kylie has notice
ch4aika [34]
La gente de que no me han dicho que me ha dado un teléfono y me han
4 0
3 years ago
Other questions:
  • You are using Windows 10 and you have created a file with called “my text” in notepad with a .txt extension type. You need to ch
    13·1 answer
  • • Write a program to find the maximum, minimum, and average score of players. The input to the program is a file containing play
    9·1 answer
  • The exercise instructions here are long -- please read them all carefully. If you see an internal scrollbar to the right of thes
    15·1 answer
  • How does Frankenstein feel about his creation?
    15·1 answer
  • Mike has never used a slide software before, but he needs to create a presentation by the end of the week. what recourse would b
    8·1 answer
  • The person responsible for setting goals and schedules, monitoring work, motivating the team, and reporting progress to managers
    7·1 answer
  • Write a function that reads from a file the name and the weight of each person in pounds and calculates the equivalent weight in
    12·1 answer
  • Para ti que es el sexting​
    11·1 answer
  • What is it called when you define a variable for the first time
    12·2 answers
  • 1) Coding for Table in Html<br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!