Page 2 of 2 FirstFirst 12
Results 21 to 29 of 29

Thread: java assignment

  1. #21
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default Re: java assignment

    can you give the example with my assignment i sent you please?

  2. #22
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,446
    Rep Power
    25

    Default Re: java assignment

    System.out.print ... > WHAT SHOULD I WRITE?
    That is up to you what you write. I thought that was what you wanted to do. That is one way to create "output"

  3. #23
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default Re: java assignment

    yes this is what i want, thanks a lot for your help :)...

    last question :

    what can i use to do this output >

    INVOICE FOR ORDER
    Bill Silic
    Apt 23
    Building 8
    Winchester POST CODE: 89763
    D24 Wood glue, clear, 1 litre 2 @ $ 5.50 $ 11.00
    K16 Wood screws, brass, 20mm, pack of 50 1 @ $ 7.75 $ 7.75
    TOTAL: $ 18.75
    Shipping: 2 items @ 1.00 2.00
    TOTAL INCL. SHIPPING: 20.75
    VAT at 20% 4.15
    TOTAL TO PAY: 24.90

  4. #24
    mkarthik90 is offline Member
    Join Date
    Feb 2012
    Posts
    62
    Rep Power
    0

    Default Re: java assignment

    Use an Object to call a class from another class..
    To create an object use

    classname obj_name = new classname();
    This will call the default constructor in the class and the object will be created with which u can access the methods or variables u need

  5. #25
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,446
    Rep Power
    25

    Default Re: java assignment

    System.out.println() should be able to print that. You could use the DecimalFormat class to format numbers to get the correct number of decimal places.

  6. #26
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default Re: java assignment

    Can you please tell me again how i can use the method to call class1 from class2

  7. #27
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,242
    Rep Power
    19

    Default Re: java assignment

    Quote Originally Posted by Tuz View Post
    can i send you my assignment?
    Can I have your grades too?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #28
    Tuz
    Tuz is offline Member
    Join Date
    Feb 2012
    Posts
    17
    Rep Power
    0

    Default Re: java assignment

    ????????

  9. #29
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,446
    Rep Power
    25

    Default Re: java assignment

    how i can use the method to call class1 from class2
    See post#17

    Take a look at the tutorials:
    Lesson: Classes and Objects (The Java™ Tutorials > Learning the Java Language)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. java assignment
    By drewjordan in forum New To Java
    Replies: 9
    Last Post: 01-15-2012, 11:44 PM
  2. need help with a java assignment.
    By Z-slasher in forum New To Java
    Replies: 7
    Last Post: 04-17-2011, 11:05 PM
  3. Need Help with Java Assignment
    By smurf67 in forum New To Java
    Replies: 4
    Last Post: 03-26-2011, 10:25 AM
  4. Help me please (Java assignment)
    By cris_carriaga in forum Java Applets
    Replies: 4
    Last Post: 10-06-2010, 04:11 PM
  5. java assignment, need help bad.
    By carlos123 in forum New To Java
    Replies: 1
    Last Post: 11-06-2007, 04:53 PM

Posting Permissions

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