#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    19
    Rep Power
    0

    Java Programming Assignment Help!




    Well, I'm starting to learn Java and am having a problem coding something because it apparently interferes with the escape sequence. I don't know how to properly concatenate it without giving me errors. I've been trying for a while now.

    Code:
    Write a Java program that prints a table with a list of at least 5 students together with their grades 
    earned (lab points, bonus points, and the total) in the format below. 
    
    ///////////////////\\\\\\\\\\\\\\\\\\\
    ==          Student Points          ==
    \\\\\\\\\\\\\\\\\\\///////////////////
    
    Name            Lab     Bonus   Total
    ----            ---     -----   -----
    Joe             43      7       50
    William         50      8       58
    Mary Sue        39      10      49
    
    The requirements for the program are as follows: 
    
    1.	Print the border on the top as illustrated (using the slash and backslash characters). 
    2.	Use tab characters to get your columns aligned and you must use the + operator both for addition 
    	and string concatenation. 
    3.	Make up your own student names and pointsthe ones shown are just for illustration purposes. You 
    	need 5 names.
    Now, I've tried but when I concatenate the slashes, they apparently end up disappearing, and I have to type in 10+ in order for the rest to show up. Why is this?!

    Any help would be much appreciated.
    Thank in advance!
  2. #2
  3. Feelin' Groovy
    Devshed Supreme Being (6500+ posts)

    Join Date
    Aug 2001
    Location
    WDSMIA
    Posts
    10,135
    Rep Power
    5053
    Why is this?!
    Review the tutorial section on escape sequences.

    ~
    Yawmark
    class Sig{public static void main(String...args){\u0066or(int
    \u0020$:"v\"ʲ\"vΤ\"".to\u0043h\u0061rArray()
    )System./*goto/*$/%\u0126//^\u002A\u002Fout.print((char)(($>>
    +(~'"'&'#'))+('<'>>('\\'/'.')/\u002Array.const(~1)\*\u002F)));}}
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2008
    Posts
    19
    Rep Power
    0
    Originally Posted by Yawmark
    Review the tutorial section on escape sequences.

    ~
    That's actually what I ended up doing! I got it about 25 minutes after I posted.

    Thanks for the help! I'll be here much more often.

    Comments on this post

    • Yawmark agrees : Great! Glad you got it working!

IMN logo majestic logo threadwatch logo seochat tools logo