Please help me in this tough problem in Java...im just new in Java program

my teacher give this as a problem. so tough. we are just starting and we are now in control structures. please help me to finish this problem. And my problem is...
Write an astrology program. The user types in his or her birthday(month,day,year),
and the program responds with the user's zodiac sign, the traits associated with each sign
the user's age(in years,months,day), the animal sign for the year(e.g., Year of the Pig,
Year of the Tiger), the traits associated with each animal sign, and if the year is a leap
year or not. The dates covered for each sign can be searched through the horoscope section
of a newspaper or through the internet. Then enhance your program so that if the user is one
or two days away from the adjacent sign, the program outputs the nearest adjacent sign as well
as the traits associated with the nearest sign. The month may be entered as a number from 1 to 12
or in words, i.e.,January to December. Limit the year of the birthday from 1900 to 2010 only.
The program should allow the user to repeat the entire process as often as desired.
You can use:
import java.text.DateFormat;
import java.util.Date;
import java.util.Calendar;
please...those who are genius out there in java program...help us to pass this project. Im begging! thanks!

Frowner_Stud wrote:
According to the second commandment: Thou shall not use the name of the Lord in vain.Is this not the definition of ironic, Mr. Morality?
i am not cheating. And more of the same.
we all know that an assignment is an assignment. a homework. homework means you can raise other help from somebody so that you will know the answer.You're not asking for "help" bucko, because you've been given decent help but have chosen to ignore it. No, you're asking for someone to do the work for you, and you may call it what you want, but in anyone else's book, that's cheating.
dont be fool enough to reply if you dont know the reason why i am typing here Don't be fool enough to think that you can control who can or can't respond.
because if you are in my part and if i know the answer there is no doubt that i will help you as soon as possible! Just because you have low morals doesn't mean that the rest of us do.
Thanks for time of reading and God bless you including you family!and to you and yours. Have a blessed day.

Similar Messages

  • Please help me transform this C++ code to java code....

    guys...please help me transform this C++ code to java code....please try to explain the code..thanks
    [program]
    #include <stdio.h>
    #define ALIVE 1
    #define DEAD 0
    #define SZ 33
    int stschk (int ,int );
    main()
    int s[SZ][SZ], i, j;
    for (i=0; i<sz; i++ ) s[0] = DEAD;
    for (j=0; j<sz; j++ ) s[0][j] = DEAD;
    s[0][1] = ALIVE;
    for (i=0; i<sz-1; i++) {
    for ( j=1;j<sz;j++ ) {
    s[i][j] = stschk(s[i][j-1],s[i+1][j];
    if(s[i][j-1]==ALIVE) printf("*");
    else printf(" ");
    printf("\n");
    int stschk(int s1,int s2)
    if(((s1==DEAD)&&(s2==ALIVE))||
    ((s1==ALIVE)&&(s2==DEAD))) return ALIVE;
    else return DEAD;

    Being picky, that's not C++, that's C. Standard headers in C++ dont' have .h after them, loop variables are scoped with the for, you use constants rather than #defines, etc..
    C and C++ both don't initialise arrays by default; you'd have to write an initialiser to get it to zero out the array:
        int s[sz][sz] = {};gcc will insert a call to memset to zero the array.
    If the author was assuming that the array was zeroed out, there would be no point zeroing the first row and column.
    The code reads values which haven't been initialised. If you mark such values explicitly undefined, and change the program to report an error when undefined, then you get several cases where the program makes such report.
    So either it' s a primitive random number generator (some random number generators use uninitialised memory as a source of randomness), or it's buggy, or it's processing undefined data and throwing away the result. Either way, it cannot be directly be ported to Java if the undefined values (which are limited to a small area of the ouput) are significant.

  • Please please please help me with this bizarre problem!!!

    Hi there,
    I am not an expert on web design and I am also not a complete newbie. I have built web designs before - and used frames and done it all on dreamweaver - however my target frames aren't working on this website and I'm not sure why???
    I have two frames on my index page - one left and one right - the left is the menu and the right is the content of which ever button is selected from the menu in the left frame. However the targets don't work - when clicking on the buttons (links) it makes a new window pop up.
    I have named the frames and saved the frame set as index.html.
    The coding says for the shop button:
    <td><a href="Shop.html" target="_right" onmouseover="MM_swapImage('Image4','','Images/Shop Button RO.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="Images/Shop Button.jpg" name="Image4" width="163" height="56" border="0" id="Image4" /></a></td>
    I have tried renaming the frames - tried a different computer - tried just about everything I can think of - it has always worked for me before but since building this site it doesn't! Have I missed something????
    Please please help me - it's been driving me up the wall for 2 weeks!!!
    Thanks in advance for yourhelp.
    Pink
    xxx

    I haven't used frames since the late 1990s, so can't be of much help  :-)
    Here's a tutorial that may help:
    http://www.dwfaq.com/tutorials/Frames/framesets1.asp
    Page 4 shows how to link pages correctly
    Is there a specific reason why you are still using frames... they are very old hat and hardly used anymore these days  :-)
    Here's the reason why frames are evil:
    http://apptools.com/rants/framesevil.php
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    Web Design & Development
    http://www.perrelink.com.au
    http://twitter.com/nadiap

  • Please help me with this strange problem again!

    Hi gurus,
    I can't, for the life of me, figure out why this does not work in a procedure but works in an anonimous block.
    The XML is like this (part of it),
    <CaseNotification messageProducedDateTime="2005-07-20T13:58:11-05:00" xmlns="http://www.courts.state.mn.us/CourtXML/2.0.0">
                   <NotificationAdminHeader caseNumberKey="87CR0569" xmlns="http://www.courts.state.mn.us/CourtXML/2.0.0">
                        <CaseCountyIdentifier>87</CaseCountyIdentifier>
                        <CaseLocationText>Yellow Medicine County</CaseLocationText>
                        <BaseCaseTypeText>Adult</BaseCaseTypeText>
                        <CaseCategoryText>Criminal</CaseCategoryText>
                        <PartyIdentifier partyKey="854">
                             <PartyCaseAssociationText>Jurisdiction</PartyCaseAssociationText>
                        </PartyIdentifier>
                        <PartyIdentifier partyKey="123637">
                             <PartyCaseAssociationText>Defendant</PartyCaseAssociationText>
                        </PartyIdentifier>
                   </NotificationAdminHeader>
                   <InterimConditionsNotification>
                        <TriggeredDateTime>2005-07-20T13:57:53-05:00</TriggeredDateTime>
                        <NotificationEvent>InterimConditionsDeleted</NotificationEvent>
                        <InterimConditionsOrder orderEventKey="1760110">
                             <OrderDate>2005-07-20</OrderDate>
                             <OrderedBy judgeKey="00001J">
                                  <JudgeName>
                                       <PersonGivenName>John</PersonGivenName>
                                       <PersonMiddleName>P.</PersonMiddleName>
                                       <PersonSurName>Smith</PersonSurName>
                                       <PersonFullName>Smith, John P.</PersonFullName>
                                  </JudgeName>
                                  <JudicialAgencyIdentifier>MN011015J</JudicialAgencyIdentifier>
                             </OrderedBy>
                             <CourtCaseNumber documentVersion="1" effectiveDateTime="2005-06-06T00:00:00-06:00">
                                  <MNCISCaseNumber>
                                       <CountyNumber>87</CountyNumber>
                                       <CaseType>CR</CaseType>
                                       <YearFiled>05</YearFiled>
                                       <SequenceNumber>69</SequenceNumber>
                                  </MNCISCaseNumber>
                                  <CaseNumberIdentifier caseNumberKey="87CR0569">87-CR-05-69</CaseNumberIdentifier>
                             </CourtCaseNumber>
                             <ConditionSubject>
                                  <Party partyKey="123637" currentNameIndicator="true">
                                       <StandardName>
                                            <PersonGivenName>Clanry</PersonGivenName>
                                            <PersonSurName>Ogavitz</PersonSurName>
                                            <PersonFullName>Ogavitz, Clanry</PersonFullName>
                                       </StandardName>
                                       <PartyCaseAssociationText>Defendant</PartyCaseAssociationText>
                                  </Party>
                             </ConditionSubject>
                             <InterimConditions>
                                  <InterimConditionText>Anger management</InterimConditionText>
                                  <InterimConditionAmount>0</InterimConditionAmount>
                             </InterimConditions>
                             <InterimConditions>
                                  <InterimConditionText>Attend AA (Alcoholics Anonymous)</InterimConditionText>
                                  <InterimConditionAmount>5000</InterimConditionAmount>
                             </InterimConditions>
                        </InterimConditionsOrder>
                   </InterimConditionsNotification>
              </CaseNotification>
    The code is basically the same except that in the procedure the passing clause gets a differnt param, which is the passed in param from the procedure.
    xmltable
                             xmlnamespaces
                             ---     'http://schemas.xmlsoap.org/soap/envelope/' as "saop",
                                  'http://www.courts.state.mn.us/CourtXML/2.0.0' as "ic"
                             'for $ics in //ic:CaseNotification/ic:InterimConditionsNotification/ic:InterimConditionsOrder[@orderEventKey = $val/oeKey]/ic:InterimConditions
                             return
                             <ic:ICS>                    
                                  <ic:ICSText>{$ics/ic:InterimConditionText}</ic:ICSText>
                                  <ic:ICSAmount>{$ics/ic:InterimConditionAmount}</ic:ICSAmount>
                             </ic:ICS>'
                             passing p_XMLDoc, xmlelement("oeKey", v_OEKey) as "val"
                             columns               
                             ICSText          varchar2(100)      path '/ic:ICS/ic:ICSText',
                             ICSAmount     number           path '/ic:ICS/ic:ICSAmount'
    The strange thing is the procedure gets the ic:ICSText with the namespace value, which is http://www.courts.state.mn.us/CourtXML/2.0.0, so the finaly result is
    the whole thing: <InterimConditionText xmlns="http://www.courts.state.mn.us/CourtXML/2.0.0">Anger management</InterimConditionText>.
    I get the correct values when testing with the anonimous code!
    What did I do wrong? Please help!
    Thank you.
    Ben

    Hi gurus,
    OK, I did another test. I ran the same PL/SQL anonymous block that gets the correct element value in 10.2.0.3.0 and it gets the same wrong value: the element name plus the namespace value and the data itself. It gets the correct element value in 10.2.0.1.0 (my local database).
    Could anyone help me with this?
    Thanks!
    Ben

  • Please help me with this ipad problem

    it like some kind of ios error it like it turned in to ipod,iphone ios
    and i cant restore when i try it said an error occured 3194 or 1601 or 1600
    and i try to restore in my ipad it didnt finish yet it is in progress for 1 day now!!!!!!
    and my device is jailbreak but i didnt use installous i only use it for like winterboard and gravipad or barrel i buy all the app
    PLEASE PLEASE HELP ME!!!!!!!!!!

    I'm not good at English (i am thai) and what is op mean and yes you are right this is my other account.
    Next time I will do better แบบทำเนี่ยนเนี่ยนอะไอ้เฟยเรามาขอให้ช่วยอแปไรเราก็ซื้อเองหมดอยากสนับสนุน apple ไม่เคยไช้เลยไอ้app cake ไรนั่นเราใช้แต่โปรแกรมเสริมเช่นwinter board barrel folder lock ไรเงี้ยเพราะ apple ไม่สามารถทำได

  • Please help me understand this memory problem

    Good day to all.
    I have an application that reads email messages. The Message object holds a StringBuffer. If I run my app for a long time, 10,000 email messages, I get an out of memory error. I am using -Xrunhprof to try to track down the problem. I can see that if I process 50 messages, there are 45 still live at the end of the program. At least that is what I think is happening. Based on the output below is this assumption correct?
              percent         live       alloc'ed  stack class
    rank   self  accum    bytes objs   bytes objs trace name
        1 40.94% 40.94%   873760   37 1267904   50   789 [C
    // Trace info
    TRACE 789:
         java.lang.StringBuffer.<init>(<Unknown>:Unknown line)
         com.PCM.SnifferMessageTools.MessageObject.<init>(MessageObject.java:46)
         com.PCM.SnifferMessageTools.MessageSnifferAutoRuleProcessor.main(MessageSnifferAutoRuleProcessor.java:118)If this assumption is correct I have some other questions. I'll wait to ask.

    Post the source code where its happening and please use code tags (see Formatting help)
    I can probably help. I have a theory or 2.

  • Please help out solve this small problem.

    I am using j2sdk1.4.1. I am getting this error whenever i am trying to connect oracle8i:-
    Exception in thread "main" java.sql.SQLException: 20
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:407)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:152)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:214)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at Employee.main(Employee.java:9)
    Can u please guide me to getsolved this problem?
    Thanks in advance.
    shrikanth

    How about posting some of you code. It might help to see why you are getting an error.

  • Someone please help me with this sync problem

    Ok here we go. I have had my laptop for a little over two years. Ever since i got my iphone 4 last summer it has been such a pain. I have backed up my phone and synced it multiple times on my computer. Every so often though i plug my iphone into the computer and it recognizes it in itunes but asks me to either set as new iphone or restore from back up. I have tried to restore from back up and it says that the back up has failed even though there is obviously a back up on the computer. I have set as new and it works fine for a day or two and then i got to resync and same problem. I have completly unistalled itunes and all its files and redownloaded it and it worked for a week or so and then same problem. I have also had my computer reset to factory settings (for an unrelated issue) and it worked the first time but then stopped working. I have tried everything i can imagine and am at the end of my rope with this phone. im so ready to call it quits and get something different cause this is so frustrating.

    How do you do what? Plug the iPhone into a USB port directly on your computer, or disconnect other USB devices? To disconnect a USB device unplug it from the computer. If it is a disk drive eject it first using the Eject icon in the System Tray. To plug the iPhone into a USB port directly on the computer insert the USB end of the sync cable into a USB port on the computer.
    If you are using all of the ports on your computer get a hub and plug low power devices into the hub (e.g., keyboard, mouse). Or get a hub with its own power supply and plug your high power devices (disk drives, DVD drive) into it.

  • Please Help me with this flash problem, my life is depending on this!

    If you visit www.fishtv.tv there is a flash document on the
    left side, it is a box with pictures scrolling. I NEED to know how
    what to open it with, and how to add a picture into it. Please if
    you have any information how to accomplish this task reply to this
    thread, OR send me an email at [email protected] It will be
    very much appreciated, thanks.

    SWF is to FLA the same way JPG is to PSD. SWF is the compiled
    (think flattened) format. Like urami
    once said, you can't get the egg back after making the
    omelette. There are SWF decompilers (search
    google or this forum) out there but most will (if not all)
    will merely allow you to obtain the
    "guts" of an swf - you will not really end up with the
    original FLA again. MUCH easier to try and
    locate the FLA or rebuild the site. Surely there's a back-up
    of the source somewhere?
    --> **Adobe Certified Expert**
    --> www.mudbubble.com
    --> www.keyframer.com
    willager wrote:
    > i have the swf file, and i open it in flash and it shows
    the final product, I dont know how to get it back to its orginal
    file.

  • Please help me with this mac problem

    I bought a mac pro without any applications installer (iPhoto, iMovie etc.) Is it really like that? Or there should be one? Btw, i bought OS X v10.

    deggie wrote:
    Did you purchase this computer from an authorized Apple dealer (or Apple Store) new or did you buy it from an individual?
    Yeah that is my question also.
    If bought Used from a Private person then you need to Register it with Apple on the Apple Website.
    You should also check that it is a Late 2011 model as if it is an early 2011 model it may of originally came with Snow Leopard Pre-Installed and that means that is should not of been sold with Lion installed. As if it is a early 2011 model that did come with SL installed then Lion is regisrted to the original buyer of Lion and not to the serial # of that Mac.

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Hello, i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    hello,
    i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    I sloved this issue by resting my phone from settings>general>reset>reset all settings...the problem will be fixed

  • I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I haven't gotten a new sim card because the problem has been presenting itself in various cards not only mine. So far, all I've done is reset my network settings.
    Last night, I turned off the 3G tab and it had all the signal bars. Today, I did the network reset and it's working apparently. But like I said before, previously the bars just disappear and the iphone only has the 3G activated.

  • HT201272 A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc. - Avinash

    Hi,
    A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc.
    - Avinash

    The purchases are probably hidden:
    http://support.apple.com/kb/ht4919

  • I cannot install itunes on my windown 7 laptop.  Error says "computer not modified".  Please help me with this problem.

    I cannot install Itunes and Icloud on my Sony Vaio Laptop - Window 7.  Error says " computer/system not modified".  Please help me with this problem. 

    Hello there, jag123059.
    The following Knowledge Base article offers up some great steps to follow for resolving issues with installing iTunes:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

Maybe you are looking for

  • Airport Base Station-Do g devices slow it down?  Parental controls

    I need to purchase a new Wi-Fi router and am looking at several but am looking at the Airport Base Station. Most of my devices such as my Mac's all use N networking but other devices such as my Xbox 360 use g networking. When doing research on the Ai

  • Verify/Repair disk permissions

    I heard that it's a good idea to verify and repair disk permissions. What does that do? And, when should I do it? -Eric

  • JSP class loader

              Hi,           I have a static block within a JSP page that get executed twice when it's being executed!           Based on the output, you can see that it's being loaded by two separated class loaders:           'weblogic.utils.classloaders

  • IPhone 3G Case with Sliding Lens Cover?

    I've seen several cases that tout a "lens cover" feature, but all they seem to be are a clear plastic shielding to protect the surface. This doesn't change the fact that if you touch it or if dirt gets on it, it will make your pictures look bad. Has

  • AirPrint Support (Request for Official Procedure/Steps)

    *I selected the iPad community as category (but this is for Apple's AirPrint Support in general) We are currently considering to add support for AirPrint in our printer-side development. Does anyone know how can receive official information from Appl