How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask R.R. Jha Your Own Question

R.R. Jha
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5470
Experience:  B.Tech
20870358
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds

Hey LogicPro! I have a question for you. I need to create

Resolved Question:

Hey LogicPro! I have a question for you.

I need to create a Java program designed to function basically as a calculator while models arbitarily large, signed integers. It has to be able to take in numbers (as strings) for arguments, and they have to be allowed to be of arbitrary size. The person testing my program could potentially put in arguments with millions of digits.

I have more specific details, but they don't fit in this question box. I'd very much appreciate your assistance!
Submitted: 1 year ago.
Category: Homework
Expert:  LogicPro replied 1 year ago.
Hi,
Welcome back

What is the deadline?

Provide the code.
Customer: replied 1 year ago.



The dead line is in a little under 24 hours. It could be as late as Friday.



Here are some more rules for the program:




  • You must implement your program from first principles, e.g., you may not use java.math.BigInteger.

  • The numbers involved in each computation may consist of millions of (decimal) digits.

  • Your unfinished methods must throw new UnsupportedOperationException() .

  • Your main() method should implement a kind of command-line calculator; for example, if I were to invoke your program like this java Ginormint 135531123487687632457563755619283 product 857093475579357093874532400394, it should output the resulting product. The permissible operator-words are sum, difference, product, quotient, and remainder.



The code must be presented in this order:



Create your code in this order:



  1. public static void main ( String[] )

  2. public Ginormint ( String ) // the constructor

  3. public String toString ()

  4. test code for each of the next five methods

  5. public Ginormint sum ( Ginormint )

  6. public Ginormint difference ( Ginormint )

  7. public Ginormint product ( Ginormint )

  8. public Ginormint quotient ( Ginormint )

  9. public Ginormint remainder ( Ginormint )

  10. optional methods together with their test code



Here's what code I have so far. I'm really not attached to it, so it can change as much as you deem necessary. Hope it helps:



http://ge.tt/8REobib/v/0



Expert:  LogicPro replied 1 year ago.
I will check and let you know ASAP.
Customer: replied 1 year ago.
thanks, LogicPro! i'll be waiting.
Expert:  LogicPro replied 1 year ago.
ok
Expert:  LogicPro replied 1 year ago.
My apologies. tried but lost. I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you. I will help you with your other questions though. Thank you for your patience.
Customer: replied 1 year ago.

Not a problem at all! thanks very much, i'll be waiting other responses.

Expert:  Raj replied 1 year ago.
Hi there,

I can help you with the requirement.
By when do you need the solution?

Thank you
Customer: replied 1 year ago.
hey raj! pretty much any time before 6 pm PST tomorrow would be great, but it's not a hard and fast requirement.
Expert:  Raj replied 1 year ago.
Ok no problem I will try to finish it before deadline....
I am sending an underprice report based on effort required to finish this.

Customer: replied 1 year ago.

hey, raj! i was just checking in to see how progress is on the problem, and if you needed any additional information.

Expert:  Raj replied 1 year ago.
I sent an underprice report long back but you never responded to it.
Customer: replied 1 year ago.

ooooh, my bad. allow me to respond to it, for some reason i completely blanked on that.

Expert:  Raj replied 1 year ago.
No problem it happens...
Customer: replied 1 year ago.

hey raj. i've updated the price a bit.

Expert:  Raj replied 1 year ago.
Yes I can see that....
But the price is oess than the report I sent.
Customer: replied 1 year ago.

oooh, sorry, i didn't check the actual price. edited again.

Expert:  Raj replied 1 year ago.

Ok No Problem...
Can you please specify me the new deadline

Also Can I have a look on the code you have already written??

Customer: replied 1 year ago.
it possible, i would appreciate it by six o'clock tomorrow at the latest.
Expert:  Raj replied 1 year ago.
yes can I have a look on the code you have written??

Thank you
Customer: replied 1 year ago.

sorry for this late response, but here's what code i have so far:


 


http://ge.tt/4dnOUAc/v/0

Expert:  Raj replied 1 year ago.
No problem...
Expert:  Raj replied 1 year ago.
The link you provided says the files have been removed.
Can you please upload them again?

thank you
Customer: replied 1 year ago.

sure thing, here you go:

 

http://www.speedyshare.com/dATE4/Ginormint.java

 

just in case, here are the specifications again for the program:

 

    • You must implement your program from first principles, e.g., you may not use java.math.BigInteger.

    • The numbers involved in each computation may consist of millions of (decimal) digits.

    • Your unfinished methods must throw new UnsupportedOperationException() .

    • Your main() method should implement a kind of command-line calculator; for example, if I were to invoke your program like this java Ginormint 135531123487687632457563755619283 product 857093475579357093874532400394, it should output the resulting product. The permissible operator-words are sum, difference, product, quotient, and remainder.



The code must be presented in this order:

Create your code in this order:



    1. public static void main ( String[] )

    1. public Ginormint ( String ) // the constructor

    1. public String toString ()

    1. test code for each of the next five methods

    1. public Ginormint sum ( Ginormint )

    1. public Ginormint difference ( Ginormint )

    1. public Ginormint product ( Ginormint )

    1. public Ginormint quotient ( Ginormint )

    1. public Ginormint remainder ( Ginormint )

    1. optional methods together with their test code



Expert:  Raj replied 1 year ago.
ok got the file this time....
Customer: replied 1 year ago.

Relist: Incomplete answer. I never received an answer, and the post has been up for over a week now.

Expert:  R.R. Jha replied 1 year ago.
Hi,

I'd be glad to help with this. I'll work it out and get back to you soon.


Thanks
Customer: replied 1 year ago.

Thanks very much! i'm happy to provide any extra information you may need.

Expert:  R.R. Jha replied 1 year ago.
Ok, no further information needed at this time.

Thanks
Expert:  R.R. Jha replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5470
Experience: B.Tech
R.R. Jha and 6 other Homework Specialists are ready to help you
Customer: replied 1 year ago.

This is perfect! I will rate your response soon so you can receive your parent. Before I do, though, I just have one question.


 


What is the "si" object being called here:


 


public Ginormint(Ginormint si) {

magnitude = si.magnitude;
sign = si.sign;


 


i can't tell if it's an object within Java, or something you created for the program.

Expert:  R.R. Jha replied 1 year ago.
It's just name of another Ginormint object. We could put any other variable name instead.
Customer: replied 1 year ago.

oooh, duuuuh. man, i should have realized that sooner. one more question: in that little snippet of code i copypasted, what is the purpose of combining the Ginormint object "si" with the fields "sign" and "magnitude", as in si.magnitude and si.sign.


 


what does that do to the ginormint object?

Expert:  R.R. Jha replied 1 year ago.
si.magnitude refers to magnitude of object si, which is in fact a 'Ginormint' number. Similarly, si.sign refers to sign of the number.
That code snippet is for Ginormint constructor, and si is the Ginormint which is passed as the parameter to this constructor. When we assign si's magnitude and sign to this instance of Ginormint, we are in effect creating just another copy of si.
Customer: replied 1 year ago.

Well, thank you very much. Those are all my questions, and you answered perfectly. Thank you!

 

i'll be rating you in just a moment

Expert:  R.R. Jha replied 1 year ago.
You're welcome!

Let me know if you need help with any other projects in future. Just add 'RRJha' at the start of your new question to send it directly to me.


Thanks

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 
Chat Now With A Tutor
R.R. Jha
R.R. Jha
2564 Satisfied Customers
B.Tech