New to Java, my teacher has confused me with detail line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • miller587
    New Member
    • Nov 2007
    • 10

    New to Java, my teacher has confused me with detail line

    In a program with parent and child classes she has asked me to print a detail line with 3 objects. Line should print name, type of object "which is a toString()", total of tuition and books. Is this the the same as I have been doing like:
    ScholarshipStud ent student 1 = new ScholarshipStud ent ( "", "Joe", etc, etc.)
    then later I will create this to print in output.
  • praclarush
    New Member
    • Oct 2007
    • 27

    #2
    Originally posted by miller587
    Line should print name, type of object "which is a toString()", total of tuition and books.
    She's talking about the actual print line. (ie.. System.out.prin t("System.out.p rint(format(7, student1.getNam e()));
    System.out.prin t(format(20, student1.toStri ng()));
    etc.)

    Originally posted by miller587
    Is this the the same as I have been doing like:
    ScholarshipStud ent student 1 = new ScholarshipStud ent ( "", "Joe", etc, etc.)
    then later I will create this to print in output.
    If I understand you right then yes this is the same as you have been doing, you declare the object with the information in it then later you print it out to the screen as i have above.

    hope this helps if it doesn't let me know and i'll try and help,
    praclarush
    Last edited by praclarush; Nov 4 '07, 12:51 AM. Reason: misspelling

    Comment

    Working...