Em Andamento

Large Integer Class

| | **Overview** | |

The range of values of an integer in the C++ language depends on the system. For example, some systems represent an integer with 2 bytes, while others represent an integer with 4 or more bytes. If an integer is represented by 2 bytes, then the range of values is -32768 to 32767 (one bit used for the sign). Your job will be to write a large integer class. This class will be able to perform basic arithmetic operations on integers up to 20 digits in length.

## Deliverables

**Problem**

Design a class called LargeInt which represents an integer with up to 20 digits. The class should have the following members.

1. Constructors.

1. A default constructor.

2. A copy constructor.

3. A constructor that takes a std::string which will consist of 1 to 20 characters that are all digits. This string will represent a LargeInt value.

2. Overloaded arithmetic operators, +, -, and *. Notice that your operators must test for overflow. If overflow occurs, display a message to that effect then quit the program.

3. Overloaded stream operators << and >>. Notice operator << will display a LargeInt and operator >> will extract a LargeInt from the keyboard.

You may include other members in the class if you like. These are the minimum requirements for the class.

**Program Operation**

You must write a program to test your LargeInt class as follows.

1. When the program is run, the user must be presented with a menu as follows.

1. Test operator +.

2. Test operator -.

3. Test operator *.

2. Quit.

For each of the operations, the user must be prompted to enter two LargeInts. The user will enter a string of digits (1 to 20) for each LargeInt. Your program must then display both LargeInts then the result of the operation. The menu must recycle after the operation is performed.

**Program Requirements**

Your program must have the following features.

1. At least one class (LargeInt).

2. A menu to greet the user.

3. Use of the keyword const in two contexts.

1. Use const for a constant member of a class.

2. Use const in a parameter list for one of the parameters that is passed.

4. Use of a data structure (You may not use the STL for this).

5. Use of a friend.

6. Use of operators new and delete.

7. Use of a namespace that you write (namespace std does not count).

8. Program Style (Comments, pre/post conditions, whitespace, indentation).

**THE DEADLINE FOR THIS IS NOVEMBER 17TH 2003 5PM. U.S MOUNTAIN TIME.**

## Platform

g++ compiler. the program must compile on a g++ compiler.

Habilidades: Programação C, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software

Ver mais: whitespace programming language, use data structure programming, two string problem, the stl, systems programming language, string stl, string member std, string data structure, stream programming, stl string, stl programming language, stl programming, stl list example, stl list, stl example, stl data, stl copy, stl 2, programming keyboard, programming data structure, list stl example, list stl, data structure problem, data structure operations, data structure example

Acerca do Empregador:
( 27 comentários ) United States

ID do Projeto: #3001510

Premiar a:

lmxvw

See private message.

$11 USD em 14 dias
(125 Avaliações)
4.6

23 freelancers estão ofertando em média $25 para este trabalho

mihaiscortaru

See private message.

$16.83 USD in 14 dias
(159 Comentários)
6.0
scalaccio

See private message.

$34 USD in 14 dias
(28 Comentários)
5.2
senzaciosnegyes

See private message.

$15.3 USD in 14 dias
(102 Comentários)
4.9
herculesevw

See private message.

$13.6 USD in 14 dias
(78 Comentários)
4.6
sergeyavw

See private message.

$17 USD in 14 dias
(54 Comentários)
4.6
bolo30

See private message.

$23.8 USD in 14 dias
(12 Comentários)
4.3
teamvw

See private message.

$25.5 USD in 14 dias
(36 Comentários)
3.8
shashikhanvw

See private message.

$68 USD in 14 dias
(15 Comentários)
3.8
rebuildingteam

See private message.

$17 USD in 14 dias
(20 Comentários)
3.5
vladimirlagutin

See private message.

$8.5 USD in 14 dias
(20 Comentários)
3.3
adam16

See private message.

$42.5 USD in 14 dias
(13 Comentários)
3.3
zetsoft

See private message.

$34 USD in 14 dias
(3 Comentários)
3.0
kidronvw

See private message.

$6.8 USD in 14 dias
(5 Comentários)
2.8
ciphereye

See private message.

$11.05 USD in 14 dias
(16 Comentários)
2.7
kartanvw

See private message.

$11.05 USD in 14 dias
(5 Comentários)
1.8
nav75

See private message.

$12.75 USD in 14 dias
(3 Comentários)
0.0
kiduboy

See private message.

$23.8 USD in 14 dias
(1 Comentário)
0.0
alexdrake

See private message.

$8.5 USD in 14 dias
(0 Comentários)
0.0
darkrainbowvw

See private message.

$6.8 USD in 14 dias
(0 Comentários)
0.0
bassvw

See private message.

$71.78 USD in 14 dias
(0 Comentários)
0.0