CS Hw that I need help with

To anyone who can help me out. I have never spent so long on a piece of code in my life.
But it refuses to work.
This code takes scanner-input for Strings and then tells user what days of the month theyre in.
I followed the format for the looks and strings by the letter but its not compiling.
import java.util.*;
import java.util.Scanner;
import java.io.*;
public class DaysInMonths2   {
public static void main(String[] args){
Scanner myScanner = new Scanner(System.in);  
Boolean isLeapYear;
String InputText = "";
String[] thirtyone = {"January", "March", "May", "July","August","October","Decemeber"};
String[] thirty = {"June", "September", "November"};
String[] february = {"February"};
System.out.println("Month. Eg. February");
input = myScanner.next();
    for (int index = 0; index < thirtyone.length; index++)
    if (input.equals(thirtyone[index]))
    daysineachmonth = 31;
    for (int index = 0; index < thirty.length; index++)
    if (input.equals(thirty[index]))
    daysineachmonth = 30;
    if (daysineachmonth==31)
    System.out.println ("31!");
    if (daysineachmonth==30)
    System.out.println ("30!");
    for (int index = 0; index < february.length; index++)
    if (InputText.equals(february[index]))
    System.out.print("Leap year (true/false)? ");
    isLeapYear = myScanner.nextBoolean();
    if (isLeapYear) {
    System.out.println ("29!");
    if(else) {
    System.out.println ("28!");
     }What the....

ykilani wrote:
Man come on you are so close.
Hints:
if(else) <--- HAHA funny
daysineachmonth <---- declare it.
inputText/myScanner confusion. <--really bad man, how could u confuse these two... dont mix ur codes up anymore.Why are you talking to yourself?
I see nothing posted by any of the previous repliers talking about "daysineachmonth" nor "inputText/myScanner", so I have to conclude that you are making fun of yourself as you are the only one who posted anything about those items.
Did you forget to login as another screen name to make it appear like someone else was making fun of you? Are you trying to commit duke star fraud?

Similar Messages

  • I have a REAL problem that I need help with

    many thanks to kglad for all his help last week with a problem but it hasn't fully sorted it out. I have a site with 908 buttons. Basically a person clicks a button, makes a donation (through paypal) and then that button gets their name displayed when the mouse hovers over it. Essentially the button becomes the property of the person who makes the donation. The problem I need help with is how to disable each button when someone clicks it. Disabling a button isn't the problem. I need it disabled only when the person has made a valid donation. Each button has a unique instance name (b001 - b908). There must be a way.
    Many thanks in advance.

    I can't get this to work at all. At this stage, I'm considering a complete restructure of the site in dreamweaver.
    I would love to be able to complete it in actionscript though as I would be learning something new.
    When a user clicks a button, and goes through the paypal process, I need the clicked button to be disabled.
    It has to be such that it gets disabled only when a user has made a donation through paypal. For example, plenty
    of people may just click on the buttons as they are checking the site out, without any intention of using the paypal
    facility. This is just human nature. Obviously, I don' t want any buttons disabled under these circumstances.
    I was thinking, do I need a statement such as .......... "on returning from paypal, disable the clicked button"
    Or is it just a case of......... "on returning from paypal, remove the event handler"
    Or is it something completely different, I require, (please don't say a brain would be helpful).
    Is there some generic code out there that could help me out please.

  • I have 2 problems that I need help with please?

    I had an iPhone 4 1 year ago and I ended up swapping it for an iPhone 4S.. I made a new apple ID. But  I can't remember if I synced my notes with iCloud on my old apple ID, so I signed in with my old apple ID which was connected with my iPhone 4 that I swapped and I seen that all of my old contacts were synced and 1 reminder were synced also but when I clicked on notes it said that I needed to create a iCloud email, so I did...it made the notes visible and there was no notes in there. Nor in the iCloud mail thingy... Which is a good thing because I didn't want my notes synced, I just want to know does that mean they were never synced ... Or are they lost somewhere?  Oh and all my iTunes backups are deleted too.
    And my next question.
    Is it possible to call apple to get my apple ID deleted? I think someone is using!

    - The notes, if they were in iCloud would be associated with the account used to create them. This you would have to log the iPod into that iCloud account
    - Contact Apple about deleting the account
    Contact iTunes

  • 2 Questions That I Need Help With...

    I'm in the process of reimporting some 3000 plus cds onto a new hard drive, after my last HD crashed. The files were retrieved for the most part, but I want to upgrade them to a higher bit rate on a different HD. Am doing it on same lappy that I began this ardous process. That lappy died on me, yet I was able to retrieve my original iTunes playlists and library (38k songs and counting) after installing 6.0.4.2 (I think my prior v. was 2-3 upgrades earlier.)
    I've noticed however, that the CD info is set back to its original state; minus my customizing it. Each album I've imported, I list the artist's name in the album title; ex. Aaron Hall: The Truth. Additionally, CDDB has some of the most atrocious spelling mistakes this side of my posts (lol) which I corrected before I originally imported the cds, and now they are back to their atrocious state. Is there ay way to correct this, so I don't have to manually retype everything that I originally did. It's not just spellings that bother me, I have plenty of greatest hits and compilations that I spent hours and hours looking through my Billboard research books, Discogs, Allmusic, etc., trying to be as accurate as possible, and it really scares me now to know that I have to go back into the iTunes library to regather this data. (for some reason when I go from album screen back into my library scree, the library screen goes back to the full library, and not to the screen with the album I had just been looking at.)
    Second, the screen that shows what cd is being readied to be imported shows 5 columns and has them so bunched up that I have to increase the width of several of them. Also, I have to go into the view options section in edit and add the year column which I insist on. But it never seems to keep that screen for all cds, meaning I have to go into edit to view options every time I import a cd. So basically, is there a way that I can customize that screen so the columns are a longer width and the year shows up each time, instead of having to do this each and every time I pop a cd into the drive to ready it?
    Also, I apologize in advance for this being too wordy, and probably missing the letter N in some of the words. I forgot to tell the tech to fix that letter on my keyboard [rolls eyes]

    Syncing of playcounts and other stats can be a bit temperamental. Resetting the device may help. I'm afraid I don't follow the behavior of chapterized podcasts, but it is likely that it changed with the last firmware update and that is just the way it works now, assuming of course that the podcast producer hasn't changed their workflow.
    tt2

  • This is more of a suggestion than a problem that I need help with....

    Why doesn't iTumes for Windows use a year long re-download policy such as RealArcade when you purchase a game? I've lost a ton of music during a driver upgrade that went bad. I had to trash my hdd & start over... and I was under the impression that I had created a backup of my music using Nero Burning Suite. But after attempting the restore, I found out that the Nero Suite doesn't do anything for the 8.3 file extension overlaod issue. Some programs will not recognize embedded folder names and files passing 256 characters for the path/ name of the file. I would like to be notified when something like this is available for the general public. I have spent a bit of cash with the iTunes store, and I would like to be able to get (at least once more ) my money's worth. I understand that this is not Apple's problem, but it would go a long way to providing superb customer service.
    Thanks for listening.

    I hate to sound preachy, but Apple warns customers to back up.
    Why do I need to back up my music library?
    In rare cases, you can ask for a re-download. Try customer service:
    iTunes Customer Service

  • An Oracle data pump situation that I need help with

    Oracle 10g running on Sun Solaris:
    I have written a unix shell script that exports data into a dump file(data pump export using expdp). Similarly I have import script that imports the data from the dump file(import using impdp). These are not schema exports. In other words, we have logically divided our schema into 4 different groups based on their functionality (group1, group2,group3 and group4). Each of these groups consists of about 30-40 tables. For expdp, there are 4 parfiles. group1.par, group2.par, group3.par and group4.par. Depending on what parameter you pass while running the script, the respective par file will be picked and an export will be done.
    For example,
    While running,
    exp_script.ksh group1
    will pick up group1.par and will export into group1.dmp.
    Similarly,
    exp_script.ksh group3
    will pick up group3.par and will export into group3.dmp.
    My import script also needs the parameter to be passed to pick the right dmp file.
    For example,
    imp_script.ksh group3
    will pick up group3.dmp and import every table that group3.dmp has(Here, import process does not need par files - all it needs is the right dmp file. )
    I am now faced with a difficulty, where, I must use Oracle's dbms_datapump API, to achieve the above same(and not expdp and impdp). I haven't used this API before. How best can I use this API to stick with my above stategy -- which is, I eventually need group1.dmp, group2.dmp, group3.dmp and group4.dmp. I will need to pass table names that each group contains. How do I do this using this API ? Can someone point me to an example, or perhaps suggest ?
    Thanks

    Or atleast, how do you do a table export using dbms_datapump ?

  • I have 2 problems with Photoshop Elements 12 that I need help with

    The problems:
    1) When I bring photos into the editor to work on them and then save them they are not automatically appearing in Organizer
    2) When I make changes in Organizer (eg adding or deleting photos) the changes do not appear in Adobe Revel. When I make changes within Adobe Revel they are appearing in my Organizer
    I have all the latest versions of Elements 12 and Revel downloaded
    Any suggestions?

    John,
    Looks like you already have 12.1 version installed.
    Have you tried restarting revel agent from Edit>Preferences>Adobe Revel?
    Do you see an orange icon next to Mobile albums header in left panel?
    Regards,
    vaishali

  • I need help with Analytic Function

    Hi,
    I have this little problem that I need help with.
    My datafile has thousands of records that look like...
    Client_Id Region Countries
    [1] [1] [USA, Canada]
    [1] [2] [Australia, France, Germany]
    [1] [3] [China, India, Korea]
    [1] [4] [Brazil, Mexico]
    [8] [1] [USA, Canada]
    [9] [1] [USA, Canada]
    [9] [4] [Argentina, Brazil]
    [13] [1] [USA, Canada]
    [15] [1] [USA]
    [15] [4] [Argentina, Brazil]
    etc
    My task is is to create a report with 2 columns - Client_Id and Countries, to look something like...
    Client_Id Countries
    [1] [USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexico]
    [8] [USA, Canada]
    [9] [USA, Canada, Argentina, Brazil]
    [13] [USA, Canada]
    [15] [USA, Argentina, Brazil]
    etc.
    How can I achieve this using Analytic Function(s)?
    Thanks.
    BDF

    Hi,
    That's called String Aggregation , and the following site shows many ways to do it:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    Which one should you use? That depends on which version of Oracle you're using, and your exact requirements.
    For example, is order importatn? You said the results shoudl include:
    CLIENT_ID  COUNTRIES
    1        USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexicobut would you be equally happy with
    CLIENT_ID  COUNTRIES
    1        Australia, France, Germany, China, India, Korea, Brazil, Mexico, USA, Canadaor
    CLIENT_ID  COUNTRIES
    1        Australia, France, Germany, USA, Canada, Brazil, Mexico, China, India, Korea?
    Mwalimu wrote:
    ... How can I achieve this using Analytic Function(s)?The best solution may not involve analytic functions at all. Is that okay?
    If you'd like help, post your best attempt, a little sample data (CREATE TABLE and INSERT statements), the results you want from that data, and an explanation of how you get those results from that data.
    Always say which version of Oracle you're using.
    Edited by: Frank Kulash on Aug 29, 2011 3:05 PM

  • HT4061 need help with my iphone 4 i try to update last five  days but after updating to 6.1.2  it says that    We're sorry, we are unable to continue with your activation at this time. Please try again later, or c

    need help with my iphone 4 i try to update last five  days but after updating to 6.1.2  it says that
    We're sorry, we are unable to continue with your activation at this time. Please try again later, or c

    If the iPhone was hacked and unlocked via unofficial means, it has become locked again. Insert original SIM in the phone to activate with iTunes.

  • Need help with duplicate print jobs over network that I can't cancel

    I have the Photosmart Premium All-in-One on my home network.  My kids who each have laptop running Windows 7 and are connected via wireless to the printer via a DLINK DIR-655.
    They hit the print button too many times and it keeps printing over and over again.
    Is there a way to get the printer to stop printing these duplicates.  I tried turning off/on but they just keep printing.
    We're wasting paper/ink and I need help with a solution.
    Please let me know.  Thanks.
    Angelo

    There should be a button with a red 'X' on it on the front of the printer.  This is the print cancel button.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • On Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    on Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    The ID Program folder will be relevant to your OS...
    I took a shot and right clicked on my Scripts Samples, choose reveal in Explorer and opened up the ID Program folder.
    As shown, there is a Fonts folder.
    Drag/Copy/Paste fonts to this folder.

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • Please help! I am trying to change my Apple Id that used to be my mother to Mine- Every time i have it changed and i go and try and do an update it continues to ask for her old password. I really need help with this!

    Please help! I am trying to change my Apple Id that used to be my mother to Mine- Every time i have it changed and i go and try and do an update it continues to ask for her old password. I really need help with this!

    Phil0124 wrote:
    Apps downloaded with an Apple ID are forever tied to that Apple ID and will always require it to update.
    The only way around this is to delete the apps that require the other Apple ID and download them again with yours.
    Or simply log out of iTunes & App stores then log in with updated AppleID.

  • I need help with a second hand iphone i purchased recently,i am having issues setting it up as it has is requesting for the icloud account that was used by the previous user

    i need help with a second hand iphone i purchased recently,i am having issues setting it up as it has is requesting for the icloud account that was used by the previous user

    Sorry.
    The iPhone is of no use until/unless the previous owner removes it from their account.
    You will need to find the prior owner or return the iPhone.

  • FormsCentral retiring in July???!!!  Are you freaking kidding me?  My clients use this feature all the time.  What do you suggest I do now?  What service do I go with that is comparable to it?  I need help with this asap!

    FormsCentral retiring in July???!!!  Are you freaking kidding me?  My clients use this feature all the time.  What do you suggest I do now?  What service do I go with that is comparable to it?  I need help with this asap!

    I would suggest checking out http://www.logiforms.com. They have really good PDF support for both hosted PDF's and generating PDFs. You can:
    populate PDF forms from a web form submission
    Merge multiple PDF's together using conditional logic
    Include uploaded images in the generated PDF
    Get Electronic signatures on PDF's
    Use conditional logic when creating PDF's
    Convert HTML to PDF. You design in HTML and CSS and use form field wildcards and generate the PDF
    More of the PDF features are explained here:
    PDF Form Creator | PDF Form Maker | V3.Logiforms.com
    They are also offering a 25% discount to anyone coming from Forms Central...

Maybe you are looking for

  • What are the major release version numbers and what versions are not considered major releases?

    I manage a QA team that tests websites in all major browsers. I need to know what versions of Firefox are considered major releases and which versions are just incremental or minor updates. With new versions being released almost every month, I can't

  • How to create a constant variable(or presentation variable) inside request

    hi i have a prompt with from_month and to_month(both i have declared as presentation variable) i need transactions of from_month to be saved as presentation variable say from_data and use it for further processing. I tried the below one created one m

  • How to handle the contents of a carousel

    Hi,all Now I have a trouble in how to handle the contents of a carousel. I use codes below:           locator=(PMTElementaryStream es).getDvbLocator();           serviceDomain.attach(locator);           dsmccObject=new DSMCCObject(serviceDomain.getMo

  • Skype photo resolution problem

    hello, I face a problem with skype when I use myskype from another computer's client. In my pc's client my photo has a normal resolution( not hd but normal). when I open my skype from work photo goes blurry (really blurry). why's that and how can I f

  • SOAP request configuration (namespaces)

    Hi there, I am trying to consume a web service via CAF/Netweaver which requests a certain name space. here an extract of the wsdl. - <wsdl:types> - <s:schema elementFormDefault="qualified" targetNamespace="http://www.serviceobjects.com/"> - <s:elemen