Search:

Type: Posts; User: WashingtonBrewologist

Search: Search took 0.09 seconds.

  1. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    So i've created the if statements that give a total to each individual month. Now how can I reach into the previous months if branch to pull out the total to sum?


    int total = 0;
    ...
  2. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    Yes! I believe that would be ok.
    do you mean something like this:
    if (month == 3)
    total = 90; // 31+28+31
    if (month == 4)
    total = 120 // 31 + 28 + 31 + 30
  3. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    I'm not allowed to use arrays yet. We are only allowed to use material from the first 5 chapters of our book which limits the possible solutions for this problem. Any other Ideas?
    By the way thank...
  4. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    I'm having trouble trying to figure out how to properly loop through the months and while doing so, also summing their days. Do you know how I could accomplish this? I know something is off in the...
  5. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    When you say "add it to Monday" do you mean: take the result of modding days of Jan by 7, and add this to 1?

    If the month is 1
    startday is one
    if not
    mod days of previous month by seven
    add...
  6. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    I'm not quite understanding what your asking. This calendar should only be displaying the correct days for the 2018 calendar year.
    My first solution which I will post again below was not what my...
  7. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    The user will enter a date with the following format (dd/mm) and it will display the calendar. Here is an example of what the console looks like when I run the program:

    Please enter a command: ...
  8. Re: How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    I have no idea where to begin with this algorithm. Do you have any sugestions?
  9. How can I determine what day of the week a given month falls on in Java without using the Calendar Object?

    I'm creating a Calendar for my CS class and need to be able to get my calendar months to start on the correct day of the week. My first go at trying to solve this problem looked something like this:...
Results 1 to 9 of 9