Question: QUE1. Write a Java application that prompts the user for a year and prints the month and day of Easter Sunday. Easter Sunday is the
QUE1. Write a Java application that prompts the user for a year and prints the month and day of Easter Sunday. Easter Sunday is the first Sunday after the first full moon of spring. To compute the date, an algorithm, invented by the mathematician Carl Friedrich Gauss in 1800 can be used. Let y be the year (such as 2001) Divide y by 19 and call the reminder a. Ignore the quotient. Divide y by 100 to get a quotient b and a remainder c Divide b by 4 to get a quotient d and a remainder e Divide 8 * b + 13 by 25 to get a quotient g. Ignore the remainder Divide 19 * a + b - d - g + 15 by 30 to get a remainder h. Ignore the quotient Divide c by 4 to get a quotient j and a reminder k Divide a + 11 * h by 319 to get a quotient m. Ignore the remainder Divide 2 * e + 2 * j - k - h + m + 32 by 7 to get a remainder r. Ignore the quotient Divide h - m + r + 90 by 25 to get a quotient n. Ignore the remainder Divide h - m + r + n + 19 by 32 to get a remainder p. Ignore the quotient Then Easter falls on day p of month n. For example, if y is 2001: n = 4 and p = 15, so in 2001, Easter fell on April 15.
QUE2. Implement a Triangle class with the appropriate methods to support the supplied list of triangle properties. Supply a program that prompts a user for the corner point coordinates. The corner point coordinates are defined by the x- and y- coordinates of its three corner points. The Triangle class needs to be able to compute the following properties of a given triangle.
Note: The java Math functions work in angles based on radians, not degrees. To convert radians to degrees use this formula: angle in degrees = angle in radians * (180 / 3.1415) The lengths of all sides The angles of all corners The perimeter The area
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
