Question

Can anyone please write the code for this.

Create a class Huge Integer that uses a40-elementarray of digits to Store integers as large as 40 digits each. Provide member functions input, output, add and subtract. For comparing Huge Integer objects, provide functions is Equal To, is Not Equal To, is Greater Than, Is Less Than, is Greater Than Or Equal To and is Less Than Or Equal To—each of these is a “predicate” function that simply returns true if the relationship holds between the two Huge Integers and re-turns false if the relationship does not hold. Also, provide a predicate function is Zero. If you feel ambitious, provide member functions multiply, divide and modulus.

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Can anyone please write the code for this.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 3. (Dynamic Array) In C++, the largest int value is 2147483647. So. an integer larger than this cannot be stored and pr...

    3. (Dynamic Array) In C++, the largest int value is 2147483647. So. an integer larger than this cannot be stored and processed as an integer. Similarly, if the sum or product of two positive integers is greater than 2147483647, the result will be incorrect. One way to store and manipulate large integers is to store each individual digit of the number in an array. Your program must, at least, contain a function to read and store a number into an...

  • Please write the program in C++ Problem Description: Design a class called Date. The class should...

    Please write the program in C++ Problem Description: Design a class called Date. The class should store a date in three integers: month, day, and year.     Create the necessary set and get methods.       Design member functions to return the date as a string in the following formats:                                     12/25/2012                                     December 25, 2012                                     25 December 2012 Input Validation: Do not accept values for day greater than 30 or less than 1. Do not accept values for month...

  • This MUST be done in C++ Write a program with a loop to ask the user...

    This MUST be done in C++ Write a program with a loop to ask the user for an integer greater than or equal to 2 and then pass the integer to a function which will produce and display on the console the ulam sequence1. Do not accept a number less than 2. 1The ulam sequence begins with an integer. If it is even, divide by 2. If it is odd, multiply by 3 and add 1. Then apply the appropriate...

  • write a Python function that takes in a list of integers and returns maximum and minimum values in the list as a tuple

    1 write a Python function that takes in a list of integers and returns maximum and minimum values in the list as a tuple. Hint (can be done in one pass, you are not allowed to use built-on min and max functions.)max, min = find_max_min(my_list):2 write a Python function that takes in a list of integers (elements), and an integer number (num). The functions should count and return number of integers in elements greater than, less than, and equal to...

  • This is a C++ probelm, I am really struggling with that...... Can anyone help me?? Write...

    This is a C++ probelm, I am really struggling with that...... Can anyone help me?? Write a fraction class whose objects will represent fractions. For this assignment you aren't required to reduce your fractions. You should provide the following member functions: A set() operation that takes two integer arguments, a numerator and a denominator, and sets the calling object accordingly. Arithmetic operations that add, subtract, multiply, and divide fractions. These should be implemented as value returning functions that return a...

  • Part 1 – Data Encryption Data Encryption is the process of transforming data, using a cipher,...

    Part 1 – Data Encryption Data Encryption is the process of transforming data, using a cipher, to make it unreadable to anyone except those possessing special knowledge. In this problem you will implement a simple encryption technique on data that comprises of non-negative integers that have at least six digits with no leading zeroes. In order to encrypt the number the following functions are to be implemented: void input(int *num); int add4(int num); int shift(int num); void printOutput(int encryptNum, int...

  • In basic c develop the code below: (a) You will write a program that will do...

    In basic c develop the code below: (a) You will write a program that will do the following: prompt the user enter characters from the keyboard, you will read the characters until reading the letter ‘X’ You will compute statistics concerning the type of characters entered. In this lab we will use a while loop. We will read characters from stdin until we read the character ‘X’. Example input mJ0*5/]+x1@3qcxX The ‘X’ should not be included when computing the statistics...

  • This is a C++ Program!!! Define a class called Rational that would represent rational numbers. Write...

    This is a C++ Program!!! Define a class called Rational that would represent rational numbers. Write a constructor that would accept two integers and initialize the numerator and denominator of the object to their values. Also include a default constructor that would initialize the numerator to 0 and denominator to 1. Implement the member functions add, sub, mul, div, less, and equal to carry out the operations +, -, *, /, <, and == (i.e., a + b would be...

  • Purpose: To familiarize yourself with variables and arithmetic. Directions: Convert the following problems below to c++...

    Purpose: To familiarize yourself with variables and arithmetic. Directions: Convert the following problems below to c++ equivalent code. Each problem should be done within the same file and all within the same main function. After each step is performed the user should be shown the updated value that was changed. Turn in the finished c++ (.cpp) file for problem 0-6 and the image file for problem 7. Remember to reset or use unique variables for each problem (you cannot declare...

  • Please write the code in C++. This is all one question with multiple requirements. 1) Create...

    Please write the code in C++. This is all one question with multiple requirements. 1) Create an enumerated data type called CrdCard The types of Credit Cards to create are all 16 digits long except American Express: American Express (34 or 37), Visa (Starts with a 4), MasterCard (Starts with 51-55), Discover (Starts with 6011). 2) Create a function that takes in the enumerated type and returns a valid credit card number using the Luhn Algorithm (also called the Modulus...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT