Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me I need two methods that add and subtract two very large numbers in java created in a class called number and it

please help me

I need two methods that add and subtract two very large numbers in java created in a class called number and it runs on the demo below class below.

Please don't use parseInt or BigIntger, they are not allowed.

Thank you so much

public class demoClass {

public static void main(String[] args) {

number num1; //number is class that we need to create to the add and subtract methods

num1 = new number("11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111");

number num2; //number is class that we need to create to the add and subtract methods

num2 = new number("22222222222222222222222222222222222222222222222222222222222222222222222222222222");

number sum = num1.add(num2);

number minus = num1.subtract(num2);

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss the key people management challenges that Dorian faced.

Answered: 1 week ago

Question

How fast should bidder managers move into the target?

Answered: 1 week ago