Results 1 to 4 of 4
  1. #1
    kenson02 is offline Member
    Join Date
    Dec 2011
    Posts
    8
    Rep Power
    0

    Default I need urgent help to complete this code please!

    import javax.swing.JOptionPane;
    public class OptionalLab {


    /** Main method
    * @return */
    public static void main(String[] args) {

    String output = "";


    // Prompt the user to enter year
    String yearString = JOptionPane.showInputDialog(null,
    "Enter full year (i.e. 2001):",
    "Enter Year", JOptionPane.QUESTION_MESSAGE);

    Integer.parseInt(yearString);

    // Prompt the user to enter month
    String monthString = JOptionPane.showInputDialog(null,
    "Enter month in number between 1 and 12:",
    "Enter Month", JOptionPane.QUESTION_MESSAGE);

    Integer.parseInt(monthString);

    // invoke method here

    public static int
    JOptionPane.showMessageDialog(null, output);

    }
    }
    Can someone lead me on how to write methods for this program, so that the program prints out the days of the month input by the user..?

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: I need urgent help to complete this code please!

    Based upon this post and your previous posts, I would highly recommend reading the following links:
    How to help yourself get help
    How to ask questions

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: I need urgent help to complete this code please!

    the program prints out the days of the month input by the user
    Can you show the input and what output you want to generate.
    The describe what methods you need to generate that output and show the code you are having problems with.

  4. #4
    kevinn205 is offline Member
    Join Date
    Nov 2011
    Posts
    65
    Rep Power
    0

    Default Re: I need urgent help to complete this code please!

    at least hide the optional lab part ;)?

Similar Threads

  1. complete the code
    By blackz in forum New To Java
    Replies: 2
    Last Post: 09-11-2011, 03:04 AM
  2. Replies: 2
    Last Post: 01-12-2009, 09:36 AM
  3. Complete code won't run in eclipse
    By confusedStudent in forum New To Java
    Replies: 2
    Last Post: 12-19-2008, 09:43 AM
  4. code HELP URGENT
    By NickkicN in forum New To Java
    Replies: 1
    Last Post: 08-14-2008, 06:43 PM
  5. Urgent small code
    By karingulanagaraj in forum New To Java
    Replies: 7
    Last Post: 08-11-2008, 05:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •