Find Jobs
Hire Freelancers

Create a class called Huge that will allow the creation and handling of large non-negative integers (up to 1000 digits).

$8-13 USD

Fechado
Publicado há aproximadamente 22 anos

$8-13 USD

Pago na entrega
You are to create a class called Huge that will allow the creation and handling of large non-negative integers (up to 1000 digits). There should be a constructor that expects a regular integer parameter (default value of 0). If a negative parameter is provided, set the value of the object to zero. There should be a second constructor that expects a string (array of char) as a parameter. If the string provided is empty or contains any characters other than ‘0’ through ‘9’, set the value of the object to zero. There should be a member function input that will allow the entry of a Huge number into an existing object. If any of the characters input is not ‘0’ through ‘9’, set the object to zero. There should be a member function add that has one parameter of type Huge. The function add should calculate the sum of the invoking object with the Huge parameter and return a Huge object that represents that sum (add should not change either the invoking object or the parameter). Should the sum cause a carry into the 1001th digit, discard that carry. There should also be a member function multiply that calculates the product of the invoking object and its Huge parameter, returning a Huge object that represents that product (multiply should not change either the invoking object or the parameter). Any digits beyond the 1000th digit in the product should be discarded. Finally, there should be a display member function that will allow the output of Huge objects. I am providing the main program. It is called [login to view URL] and may be copied from my home directory on the CS machine. Assuming you are logged into the CS machine, the command “cp ~leach/[login to view URL] .?? will create a file by that same name under your current working directory. You can then use SSH (or cslogon) to get that file to a PC. Your class declaration and implementation files must work with my demo program (don’t change my program to make your code work!). Your output should look IDENTICAL to mine. Most questions about the required behavior of the class can be determined by carefully examining my demo program and the sample execution that are given below. You should submit two files in the standard way: huge.h and [login to view URL]… do not submit the [login to view URL] file. ## Deliverables Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased. ## Platform Must be done in visual c++. ## Deadline information must be done by 3/3/2002
ID do Projeto: 2840410

Sobre o projeto

11 propostas
Projeto remoto
Ativo há 22 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
11 freelancers estão ofertando em média $8 USD for esse trabalho
Avatar do Usuário
See private message.
$10,20 USD em 14 dias
4,9 (139 avaliações)
5,6
5,6
Avatar do Usuário
See private message.
$6,80 USD em 14 dias
5,0 (60 avaliações)
5,0
5,0
Avatar do Usuário
See private message.
$11,05 USD em 14 dias
5,0 (43 avaliações)
4,8
4,8
Avatar do Usuário
See private message.
$11,05 USD em 14 dias
4,5 (17 avaliações)
3,3
3,3
Avatar do Usuário
See private message.
$6,80 USD em 14 dias
4,8 (16 avaliações)
3,1
3,1
Avatar do Usuário
See private message.
$11,05 USD em 14 dias
5,0 (2 avaliações)
0,2
0,2
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
5,0 (3 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$6,80 USD em 14 dias
0,0 (1 avaliação)
0,0
0,0
Avatar do Usuário
See private message.
$5,53 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$6,80 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
0,0
0
Membro desde fev. 18, 2002

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.