File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calculation methods

 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have been working on this program and i have gotten it almost complete. everything is working correctly except for my output on two calculations. its something like this:


i have been looking over my methods but i cant figure it out. if someone can see the problem it would be a big help.



 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the bulbs column fixed, but my co2footprint column is still jacked up
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wheewww i figured this part out.
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have got another small problem before i will be completed with this. everything works fine, but it outputs out of line.





is there a simple way to do this? im aware of print f, but ive never used it with this type of output, will it work? how do you do it?
 
Janeice DelVecchio
Saloon Keeper
Posts: 1802
12
Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:



I think that'll do it.
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you so much man. sooooo glad to get this assignment done its like wooow
 
Janeice DelVecchio
Saloon Keeper
Posts: 1802
12
Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So.... post what you have so we can see......

 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nathan gibson wrote: . . . man. . . .
Don't call Janeice "man"
 
Janeice DelVecchio
Saloon Keeper
Posts: 1802
12
Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
nathan gibson wrote: . . . man. . . .
Don't call Janeice "man"


It's nice *someone* looks out for me.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Janeice DelVecchio wrote:It's nice *someone* looks out for me.
You're welcome I have to do the same for Jeanne and Joanne too, sometimes.
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why have you got so many fields? Why are they all public?

Why are you dividing aveElecBill by itself? And are you getting 1.0?
 
nathan gibson
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think i grabbed the wrong revision and posted it. i had those as private. actually its (aveElecBill/aveElecPrice), i know that sounds the same, but it is just a poor naming of variables. its actually your bill/ how much you are charged for each "piece" (whatever the unit is, watts i guess) i cant vouch for the formula it was given to me with the assignment.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nathan gibson wrote: . . . actually its (aveElecBill/aveElecPrice) . . .
I'm glad it was just me not reading it properly
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic