Write a program that prompts the user to enter a year

Assignment Help Computer Engineering
Reference no: EM132075955

Need help implementing this Java class

(Science: day of the week) Zeller's congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is h = (q + (26 * (m + 1)) / 10 + k + k / 4 + j / 4 + 5 * j) % 7 where

h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday).

q is the day of the month.

m is the month (3: March, 4: April, ..., 12: December). January and February are counted as months 13 and 14 of the previous year.

j is the century (i.e., year/100).

k is the year of the century (i.e., year%100).

Note that the division in the formula performs an integer division. Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the week. Here are some sample runs:

Enter year (e.g., 2012): 2015
Enter month (1-12): 1
Enter the day of the month (1-31): 25
Day of the week is Sunday!

and

Enter year (e.g., 2012): 2012
Enter month (1-12): 5
Enter the day of the month (1-31): 12

Reference no: EM132075955

Questions Cloud

Compute moozi fixed manufacturing overhead variances : Moozi applies manufacturing overhead to its products on the basis of standard machine-hours. Compute Moozi fixed manufacturing overhead variances for last year
How many pins for clock and ground : Let's say we broken it up into 8 banks? How many total pins now? 43 Then why use banks? Concurrent reads
How much interest will you pay : A sailboat costs $24, 574. You pay 10% down and amortize the rest with equal monthly payments over a 9-year period. If you must pay 7.8% compounded monthly.
Describe all the flows of information between marketing : Your company sells tickets to concerts and sporting events. Describe all the flows of information between Marketing and Sales.
Write a program that prompts the user to enter a year : Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the week.
The creation of sequence and communication diagrams : what guidelines should be followed when creating or drawing a sequence diagram?
Relevant common law and equity principles operating : Answer the following questions with reference to the relevant common law and equity principles operating in Australia concerning contracts
How many flights in a day must national airlines operate : How many flights in a day must National Airlines operate to make 25% profit margin if it expects the average load factor
What is the present value of discounted back : What's the present value of $1,500 discounted back 5 years if the appropriate interest rate is 6%, compounded semiannually?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Studying the properties of a network

Studying the properties of a network

  Describe the role of dns in enabling dynamic connections

Describe the role of DNS in enabling dynamic connections. Could DNS function with a fully centralized directory server architecture? Why or why not?

  What ethical social and political issues arise with the use

information is data that is framed in a specific context. in this sense information is contextual data that has a level

  Based on the assigned materialsnbspwrite a paper answering

based on the assigned materialsnbspwrite a paper answering the following questions.how can an it system initially help

  Calculate the approximate bit rate and signal level

Calculate the approximate bit rate and signal level(s) for a 4.2 MHz bandwidth system with a signal to noise ratio of 170. In a peer-to-peer (P2P) network, Internet users that are ready to share their resources become peers and form a network. Descr..

  Discuss what aspects of the recommended maintenance model

What aspects of the recommended Maintenance Model do you like and which do you dislike

  Explain how a dfs can be used to look for cycles in a graph

question 1choose one of the exercised from the award winning book computer science unplugged. record a creative

  Explain the web-based information technologies protocols

as a chief security officer cso for a large hospital you are charged with securing medical health care records. more

  Concept of aloha

A large population of the ALOHA users manage to produce the 50 requests/sec., involving both the originals and retransmissions. Time is slotted in units of 40 msec. State the chance of success on the first attempt?

  Show the output carries for the up count

Draw the graphic symbol of an up-down synchronous binary counter with mode input (for up or down) and count-enable input with G dependency. Show the output carries for the up count and the down count.

  How can be secure mail infrastructure using identities

How can be secure mail infrastructure using identities.What may be a new approach to secure mail infrastructure?

  Diploma of information technology design

ICT50115 Diploma of Information Technology Design and implement programs that connect to a database and design and implement programs that use the language facilities to extract, update, and delete data stored in a database

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd