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: Norman Ray   on Apr 24

> So the problem  still remains how to input  m and b from the prompt
and also when I 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.

Firstly, there is no method LinearEquation(a[][], b[]). There are 2
constructors that take 2 and 4 doubles respectively.

You already have m and b stored in the vars of the same name. The user
will also input y (Hint: Look at the example  inputs and output  and
figure out what inputs are what). Use the same syntax as the previous
inputs.

The last output you do is the value of x for the given value of y.
Look at the code for LinearEquation. There is a way to do this.

I still have a issue with not being allowed to do any math in
PhoneBill, as you must convert at least one  of m or b to the other's
units. Without being allowed to do that, the problem is unsolvable.

Share: