Announcement

Collapse
No announcement yet.

Extreme Java Help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extreme Java Help

    Ok guys for the last assignment in my JAVA 120 class we have to create a program using modular programming to create a calendar. I need help and do not know where to start, so I figured some of you guys can help me out like you have done in the past. Here is that the sheet says:



    Problem:
    Write a JAVA program to print out the calendar of any year provided that the day of January 1 of that year is known. (Note: Leap year is a year whose number is divisible by 4. The Feb. of a leap year has 29 days. Also note that the calendar MUST be printed in the required format. i.e., threee months on a row.)

    Specifications:

    Use modular programming to write a program. An example of the execution may be as follows:

    What year would you like to view?
    2002
    What is the day of Jan.1?(S-1, M-2, T-3, W-4, T-5, F-6, S-7)
    3
    //>>>>A PRINTOUT OF THE CALENDAR WOULD GO HERE<<<<

    Testing:
    Test your program with year 2000 and 2003.





    That is just the beggining, I'll scan the actual Assignment page ASAP and post it here, so if anyone wants to help, they can do it the best way possible.

    THANKS IN ADVANCE
    Last edited by .143 Beth©; 10-22-2006, 09:26 PM.


  • #2
    Re: Extreme Java Help

    I have no experience in Java, but this website might help in giving you some ideas:

    http://www.w3schools.com/

    dont know if it will help or not, i just remember having to reffer to it while experimenting with html and others. there is a section on Java in there.

    Comment


    • #3
      Re: Extreme Java Help

      That website has information about Javascript not Java. Two completely different things.

      Comment


      • #4
        Re: Extreme Java Help

        What's your major again? I'm quite surprised that you have no idea where to start. Break down the problem into little pieces since that's part of what modular programming.

        Start asking yourself some questions:
        What months have 31, 30 or 28 days?
        Is it a leap year?
        What day does the month start?

        The answers to these questions will lead you to the methods required and the parameters for each method.

        You may want to start researching formatting output in Java if you haven't been taught in class. There are some things you have to do to get specific tab spacing and such.

        - It's who you game with.

        Comment


        • #5
          Re: Extreme Java Help

          What you're really doing here is building a calendar. That's the main object. What does it consist of? Mostly twelve months, plus the number of the year itself. What do the months consist of? Well, there's the name of the month itself, plus a number of days, arranged into weeks (rows) and days of the week (columns). How can you represent that?

          To program modularly, build your calendar a month at a time, and build your months (I would suggest) a week at a time.

          Think about how you'll have to iterate through your months and their weeks to build your output.
          |TG-1stMIP|Mannerism​​​​​​​

          Comment


          • #6
            Re: Extreme Java Help

            http://en.wikipedia.org/wiki/Leap_year
            Dude, seriously, WHAT handkerchief?

            snooggums' density principal: "The more dense a population, the more dense a population."

            Iliana: "You're a great friend but if we're ever chased by zombies I'm tripping you."

            Comment


            • #7
              Re: Extreme Java Help

              Dude, this is crazy.
              I can understand you showing us code you've written, running into a bug or something, and asking us specific help on a particular issue because you're stuck.

              But STARTING an assignment, and saying, "How do I do it? I have no idea." is just obnoxious. Have you attended your class?

              I give you one tip, and one only, and it's a very good one. Heed it if you want to succeed:
              http://www.odioworks.com/download/TI...edition4.0.zip
              http://www.thinkinginjava.com/
              "You live and learn. Or you don't live long."
              - Lazarus Long

              Comment


              • #8
                Re: Extreme Java Help

                Thats 2 :D. Coding language generally breaks down into math formulas, so I would start off getting a simple program going that tells you what the calnedar looks like for each year.

                Textbox (or mabey a drop down list?):

                if "textbox name"="2002"
                display= "something"

                i have little clue how to do Java, but break it into if's and then's. Then its just addition and invisible cells to put the numbers into:

                Cell 1:

                if day=3, displaybox1=0 (where 0 is nothing)
                if day=1, displaybox1=1 (number 1)
                if displaybox1=1, displaybox2=$x+1

                $x=1

                I am probably confusing you (and myself) so i will just post my jibberish and mabey you will see it correctly. i dont even know if variables are with the $ in front.

                Comment


                • #9
                  Re: Extreme Java Help

                  No,No,No, guys, I am not asking you guys to do it for me, I was just asking for some tips on where to start. I am starting the progrma tonight, and I wanted to get ideas before i started. Don'tthink that i want yall to do it, I just wanted feedback on where to start. Thnaks for all the info, I am not trying to get a free ride here.

                  Comment


                  • #10
                    Re: Extreme Java Help

                    Does it count if you use an off-the-shelf bean? Sun just released a new development environment (free download) that includes a calendar object you can drag onto your work space. The news was on digg.com a day or two ago.
                    Dude, seriously, WHAT handkerchief?

                    snooggums' density principal: "The more dense a population, the more dense a population."

                    Iliana: "You're a great friend but if we're ever chased by zombies I'm tripping you."

                    Comment


                    • #11
                      Re: Extreme Java Help

                      Here's the digg.com article I saw:

                      http://digg.com/programming/The_new_...E_(flash_demo)

                      You have to get a free developer membership to get access to the downloads.
                      Dude, seriously, WHAT handkerchief?

                      snooggums' density principal: "The more dense a population, the more dense a population."

                      Iliana: "You're a great friend but if we're ever chased by zombies I'm tripping you."

                      Comment


                      • #12
                        Re: Extreme Java Help

                        I'll second the recommendation to check out Thinking in Java. Bruce Eckel is quite good at teaching programming. You might find Richard Baldwin's Java Tutorials at http://www.dickbaldwin.com/ to be helpful, too.
                        |TG-1stMIP|Mannerism​​​​​​​

                        Comment


                        • #13
                          Re: Extreme Java Help

                          Ok, I need help witha return statement.
                          here is the problem:

                          public static int test(int p)
                          {
                          int p;
                          cq=p+5;
                          return cq;
                          }




                          is this the correct syntax?
                          my computation is more advanced than this basic one, but the generla idea is that I have to enter variable p, use it in computations, and return varialbe cq, while keeping the variable p the same.

                          also, how would i call the variable cq in another method?

                          Comment


                          • #14
                            Re: Extreme Java Help

                            Beth, go to your prof or TA and use your references. This is not to say "go away" from here but I think there are some very fundamental ideas you are missing that won't be solved here. The forums could work for helping solve a specific problem or niggling detail but I believe you need instruction and you can't get that here.

                            Comment


                            • #15
                              Re: Extreme Java Help

                              ty anyway, ill look it up

                              Comment

                              Connect

                              Collapse

                              TeamSpeak 3 Server

                              Collapse

                              Advertisement

                              Collapse

                              Twitter Feed

                              Collapse

                              Working...
                              X