HELP .... Beginner JAVA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chihwei
    New Member
    • Jun 2007
    • 1

    #1

    HELP .... Beginner JAVA

    can any one help me on this one ?
    thank you

    Write the definition of a class Telephone . The class has no constructors, one instance variable of type String called number , and two static variables. One is of type int called quantity , initialized to 250 ; the other is of type double called total , initialized to 15658.92 .
  • jeffbroodwar
    New Member
    • Oct 2006
    • 118

    #2
    Hi,

    -------------------------------------------------------------------------------------------------------------------

    /*
    * Telephone.java
    *
    * Created on June 12, 2007, 11:17 AM
    *
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    */

    /**
    *
    * @author PC_JeffBroodwar
    */
    public class Telephone
    {
    String number;
    static int quantity = 250;
    static double total = 15658.92;




    }

    -------------------------------------------------------------------------------------------------------------------

    Hope this helps,

    Regards,
    Jeff

    Comment

    • nomad
      Recognized Expert Contributor
      • Mar 2007
      • 664

      #3
      Originally posted by jeffbroodwar
      Hi,

      -------------------------------------------------------------------------------------------------------------------

      /*
      * Telephone.java
      *
      * Created on June 12, 2007, 11:17 AM
      *
      * To change this template, choose Tools | Template Manager
      * and open the template in the editor.
      */

      /**
      *
      * @author PC_JeffBroodwar
      */
      public class Telephone
      {
      String number;
      static int quantity = 250;
      static double total = 15658.92;




      }

      -------------------------------------------------------------------------------------------------------------------

      Hope this helps,

      Regards,
      Jeff
      Jeff Remember this is a site to help not to do someone homework.
      nomad

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by chihwei
        can any one help me on this one ?
        thank you

        Write the definition of a class Telephone . The class has no constructors, one instance variable of type String called number , and two static variables. One is of type int called quantity , initialized to 250 ; the other is of type double called total , initialized to 15658.92 .
        nomad is right. chihwei should at least have posted some code that he's attempted. Spoon feeding will not help him pass exams.

        Comment

        • jeffbroodwar
          New Member
          • Oct 2006
          • 118

          #5
          Sorry, I didn't know that...... ^^;

          Comment

          Working...