Find Jobs
Hire Freelancers

Write some Software DFA

$10-30 USD

Concluído
Publicado há mais de 7 anos

$10-30 USD

Pago na entrega
In C++ programming language, all the following expressions represent valid numerical “literals”: 3 13. .328 41.16 +45.80 +0 -01 -14.4 1e12 +1.4e6 -2.e+7 01E-06 -.4E-7 00e0 +0e1 .2E-03 Literals consist of an integral part and an optional exponent part. Integral part consists of an optional sign ( ‘+’ or ‘-‘ ) and literal value. Literal value should consist of at least one digit either before or after the decimal point. However, the decimal point is also optional. Exponent part (which is optional) starts with either ‘e’ or ‘E’, and if it appears, the number following it (‘e’ or ‘E’) must be an integer (with optional ‘+’ or ‘-‘ sign). Assume that there are no limits on the number of consecutive digits in any part of literal (but the length of string is limited to 50 digits/characters.) 1. Construct a DFA for language of valid numeric literals. 2. Based on the DFA in (1), a. Write a C++ program that read in a file of strings, one on each line, and output whether or not each string is a valid numeric literal. b. Write a regular expression representing the language of numeric literal by using the R(i,j,k) approach as discussed in class. Show your steps. 3. Compare the efficiency and difficulty writing a program of this DFA approaches with respect to the one in project A. Your program should execute on the machines in the department’s lab. Please test your program thoroughly and make sure it is free of errors. Points will be deducted for each error that I discover for you. Please also pay attention to program design and follow all the good programming practice. I reserve the right to deduct points based on these criteria. Submit: DFA diagram for part (1). Intermediate steps of solving the recurrence relation R(i,j,k) Program design Hierarchical diagrams/ Structure charts Procedure specification Program listing Testing files/cases with Justification Results of test files/cases Example input: [login to view URL]: 3 13. .328 41.16 +45.80 +0 -01 # Example output: [login to view URL] 3 is a valid numeric 13. is a valid numeric .328 is a valid numeric 41.16 is a valid numeric +45.80 is a valid numeric +0 is a valid numeric -01 is a valid numeric # is NOT a valid numeric literal
ID do Projeto: 12256790

Sobre o projeto

2 propostas
Projeto remoto
Ativo há 7 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
Concedido a:
Avatar do Usuário
Hi! I can create a simple DFA for that and code the relative C++ application & regex (regular expression). I can finish this today, in the next few hours.
$30 USD em 1 dia
5,0 (76 avaliações)
5,8
5,8

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
0,0
0
Membro desde dez. 2, 2016

Verificação do Cliente

Outros trabalhos deste cliente

Write some Software
$10-30 USD
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.