• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Output formatting

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Further to my previous post, I now need to format the output of the program to look like the following:

Worker's projected yearly gross salary : XXXXXX.XX

Superannuation contribution
Employer contribution : XXXXXX.XX
Employee contribution : XXXXX.XX

Worker's weekly assessable income : XXXXXX.XX
Weekly income tax : XXXXXX.XX
Medicare levy : XX.XX
Child Support contribution : XXX.XX
: ========
Take home pay : XXX.XX

Now the actual outputs are fine but I need to get the extra lines in place and the :======= as shown in the 2nd last line. I am not too sure how to go about this, can anyone point me in the right direction.

My output current appears like this:



Although in realty the figues are actually in line.

Thanks in advance!
 
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And what are you using to output these lines?
 
Linda Selfridge
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, the following is the code...



Thanks
 
Ralph Cook
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it appears that you're asking to output a blank line and a line with dashes or equals signs in it. I don't know why you can't just use System.out.println("") and System.out.println("=============>") or whatever.

rc
 
Linda Selfridge
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ralph, I had though about doing that but wasn't too sure if there was a particular way of doing these types of things. (I am only in my 3rd week of doing these types of programs).

I will give it a go.

Thank you for your help
 
reply
    Bookmark Topic Watch Topic
  • New Topic