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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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