Question: I don't know how can I make those functions Implements* those functions (add , sub , mul and div) public interface Nombre { N add(NX);

 I don't know how can I make those functions Implements* those

I don't know how can I make those functions

Implements* those functions (add , sub , mul and div)

public interface Nombre { N add(NX); N sub(NX); N mul( Nx); N div( Nx); This interface describes the different functions between two numbers, addition, subtraction, multiplication, and division. 2. write a class NDouble that represents a double and that implements the interface Nombre. This class should begin with: public class NDouble implements Nombre It is going to contain a field of type double and a constructor. It must also implement the functions of the interface and you should add a toString the unique field of the instance. 3. Write a class Fraction that implements the interface Nombre. Place a method tostring. Here are the simple rules for each method: . addl) = subla) mull 3a) divlj) - od ad+bc bd ad-bc bd ac bd ad bc . | 4. Write a principal class that contains a main to test your two classes. 5. Add a method static in your principal class that will do the sum of a data table. This method will return null if the table is empty. Here is the signature of this method: public static > Nombre somme ( ArrayList tableau) public interface Nombre { N add(NX); N sub(NX); N mul( Nx); N div( Nx); This interface describes the different functions between two numbers, addition, subtraction, multiplication, and division. 2. write a class NDouble that represents a double and that implements the interface Nombre. This class should begin with: public class NDouble implements Nombre It is going to contain a field of type double and a constructor. It must also implement the functions of the interface and you should add a toString the unique field of the instance. 3. Write a class Fraction that implements the interface Nombre. Place a method tostring. Here are the simple rules for each method: . addl) = subla) mull 3a) divlj) - od ad+bc bd ad-bc bd ac bd ad bc . | 4. Write a principal class that contains a main to test your two classes. 5. Add a method static in your principal class that will do the sum of a data table. This method will return null if the table is empty. Here is the signature of this method: public static > Nombre somme ( ArrayList tableau)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!