Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Kiswar Malik   on Apr 24 In Java Category.

  
Question Answered By: Jezza Brown   on Apr 24

Thanks for the reply but to clarify I will have to see a tutor at school on
Monday or Wednesday as this assignment is due Thursday and I am really stuck. If
you care to explain my error here I will be up and running once again and it
will save me three days time for my studies. To refresh your memory the class
linear equation  does compute the double as y=m*x=b and where I am now I can only
input x without knowing  m and b like so:

public class  PhoneBill
{



public static  void main  ( String[] args  )
{

LinearEquation max  = new LinearEquation(1.0, 0.0 );

Terminal pb = new Terminal();

int b = pb.readInt("Basic rate (in dollars): " + max.compute(b));
double m = pb.readDouble("Cost per message  unit (in cents): ");
double xb = pb.readDouble("Number of messages units: ");
pb.println("Phone bill is: " + max.compute(m));




}
}

So the problem  still remains how to input  m and b from the prompt and also when
create  LinearEquation it takes to parameters  of type  a[][], and b[]. Now I
thought of something like double myDouble = m*xb to input the double but that is
doing math  in the PhoneBill.java file  and not allowed. For your information my
original post  is #13786. Any assistance  you can give  in this matter is greatly
appreciated.

Share: