Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An array can be used to store large integer sone digit at a time. For example, the integer 1234 could be stored in the array

An array can be used to store large integer sone digit at a time. For example, the integer 1234 could be stored in the array a by setting a[0] to 1, a[1] to 2, a[2] to 3, and a[3] to 4. However, for this project, you might find it easier to store the digits backward, that is, place 4 in a[0], place 3 in a[1], place 2 in a[2], and place 1 in a[3].Design, implement and test a class in which each object is a large integer with each digit stored in a separate element of an array. Youll also need a private member variable to keep track of the sign of the integer (perhaps a boolean variable). The number of digits may grow as the program runs, so the class must use a dynamic array. Discuss and implement other appropriate operators for this class.

You should be able to initialize the class using a default constructor (no parameters) AND by giving a number (a non-default constructor).

You should be able to append digits (e.g. if the number stored is 123, you can add more digits.. 45 and the new number is 12345).

USE DYNAMIC MEMORY.

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago