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.
Experimental probability describes how frequently an event actually occurred in an experiment. So if you tossed a coin 20 times and got heads 8 times, the experimental probability of getting heads would be 8/20, which is the same as 2/5, or 0.4, or 40%.
Even if you invest in the best possible security infrastructure for your corporate network, you will still be vulnerable to attacks which exploit human shortcomings. An example is where an attacker manipulates a company employee to get the system access password in return for a favour. Now he can use the password to bypass all security infrastructure and gain access to critical data and code.
Following are attached images that will help you understand the complete code. The code is tested with different variables and different outputs are obtained. All the necessary description is given in the form o comments inside the code.