Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Java intro help

Name: Anonymous 2012-08-25 12:54

Hi /prog/ I'm brand new here. Reading ahead/studying ahead for my Java programming class and I'm doing an practice exercise. So I'm doing a SimpleDate class and just trying to set day 32 and month 13 as illegal values and finally, assign the value null to dateObj. If you need more info, I'll gladly post it as I'm still very new.

Name: Anonymous 2012-08-25 13:00

If it ain't lisp, it's niggers.

Name: Anonymous 2012-08-25 13:41

post the code you scrub

Name: Anonymous 2012-08-25 13:47

import java.awt.*;
import javax.swing.JFrame;

public class SimpleDateClient extends JFrame
{
  private String action = "";

  private int animationPause = 2; // 2 seconds between animations

  private SimpleDate ; // declare SimpleDate object reference

  public void workWithDates( )
  {
    animate( "dateObj reference declared" );

    /***** Add your code here *****/
    /**** 1. Instantiate dateObj using an empty argument list  */
     dateObj = new SimpleDate ();
    animate( "Instantiated dateObj - empty argument list" );
    /***** 2. Set the month to the month you were born */
     dateObj = new SimpleDate.setMonth(11);

    animate( "Set month to birth month" );


    /***** 3. Set the day to the day of the month you were born */
     dateObj = new SimpleDate.setDay(13)

    animate( "Set day to birth day" );


    /***** 4. Set the year to the year you were born */
     dateObj = new SimpleDate.setYear(1987);

    animate( "Set year to birth year" );


    /***** 5. Call the nextDay method */
     birthDay.nextDay();

    animate( "Set the date to the next day" );


    /***** 6. Set the day to 32, an illegal value */
    

    animate( "Set day to 32" );


    /***** 7. Set the month to 13, an illegal value */


    animate( "Set month to 13" );


    /***** 8. Assign the value null to dateObj */
   

    animate( "Set object reference to null" );
    dateObj = null;

    /***** 9. Attempt to set the month to 1 */
    SimpleDate aDate;
    aDate.setMonth(1);
  }

Name: !VpJaVfgnvA 2012-08-25 14:44

oh

Name: !VpJaVfgnvA 2012-08-25 14:45

my

Name: Anonymous 2012-08-25 14:47

ENTERPRISE QUALITY

Name: Anonymous 2012-08-25 15:36


Don't change these.
Name: Email:
Entire Thread Thread List