Hi I am trying to write a program which works out a bunch of stuff, and I want the final answer to be given to 2 decimal places Here is an excerpt from the code, the bit which I need to be given to 2 decimal places is the last two lines.
I used 2 classes, om is a copy of another class which contains formulae and stuff
Thanks for the help!
System.out.print ("volume cost: ") ;
System.out.println (""+length+" x "+width+" x "+height+" x "+om.multiplier+" =" + om.volumecost (length, width, height, om.multiplier)) ;
System.out.print ("overhead cost: ") ;
System.out.println (""+length+" x "+width+" / "+om.divider+" =" + om.overheadcost (length, width, om.divider)) ;
System.out.print ("total cost: ") ;
System.out.println (""+om.volumecost (length, width, height, om.multiplier)+" x "+om.overheadcost (length, width, om.divider)+" + "+om.officecharge+" =" + om.totalcost (om.volumecost (length, width, height, om.multiplier), om.overheadcost (length, width, om.divider), om.officecharge)) ;

