Checkout
checkout
view
Your Cart Your Cart: item(s)
Subjects -> Computer Science -> Other -> Posting #31582
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Other
Year 3

Using Classes


Revernd Zeller developed a formula for computing the day of the week on which a given date fell or will fall.  Suppose that we let a, b, c, and d be integers defined as follows:
a = the number of a month of the year, with March = 1, April = 2, and so on, with January and February being counted as months 11 and 12 of the preceeding year.
b = the day of the month
c = the year of the century
d = the century

For example, July 31, 1929 gives a = 5, b = 31, c = 29, d = 19; January 3, 1988 gives a = 11, b = 3, c = 87, d = 19. Noe calculate the following integer quantaties:
w = the inter quotient (13a - 1)/5
x = the integer quotient c/4
y = the integer quotient d/4
z = w + y + b + c - 2d
r = z reduced modulo 7; that is, r is the remainder of z divided by 7: r = 0 represents Sunday; r = 1 represents Monday, and so on

Write a function day_of_the_Week () that receives the name of a month, the day of the month, and a year and returns the name of the day of the week on which that date fell or will fall.  Write a program that inputs several strings representing dates, calls the function day_of_the_Week() and displays the day returned by the function.

a. Verify that December 12, 1960 fell on a Monday, and that January 1 1991 fell on a Tuesday.
b. On what day of the week did January 25, 1963 fall?
c. On what day of the week did June 2, 1964 fall?
d. On what day of the week did July 4, 1776 fall?
e. On what day of the was February 8, 1962?

By OTA:  Joe Lee, MS

OTA Rating:  4.6/5

Your Price:  $2.19  (original value ~$11.97)

What's included:

  • Plain text response
  • Attachment(s):
    • day.cpp
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download
Programming Problem (Selection) - Given: To locate the nearest numbered cross street for a given avenue address, the following algorithm can be used: cancel the last diget of the address, divide by 2, and add or subtract the number given in the following abbreviated table: 1st Ave. add 3 2nd Ave. add 3 3rd Ave. ...
Programming Problem (Selection) - An airline vice president in charge of operations needs to determine whether the current estimates of flight times are accurate. because there is a larger possiblity of variations due to wether and air traffic in the longer flights, he allows a larger error in the time estimates for them. He compares an actual flight time with the estimated flight time and consi...
Programming Problems (Selection) - Write a function convertLength() that receives a real value and two strings inUnits and outUnits, then converts the value given in inUnits to the equivalent metric value in outUnits and displays this value. The function should carry out the following conversions: inUnits outUnits I c (inches to centimeters; 1 in. = ...
Files and Streams - People from three different income levels, A, B, and C, rated each of two different products with a number 0 through 10. Construct a file in which each line contains the income level and product rankings for one respondent. Then write a program tht reads this information and calculates the following: a. for each income bracket, the average rating for product 1; b. the numbe...
Arrays, vectors, and STL - The Rinky Dooflingy Company manufactures different kinds of doofingies, each identified b a product number. Write a program that reads product number and prices and stores these values in two arrays, number and price;number[0] and price[0] are the product number and unit price for the first item, number[1] and price[1] aare the product number and unit price for the s...

Page generated in 0.0618 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples