Find Jobs
Hire Freelancers

Write some Software DFA

$10-30 USD

Fullført
Lagt ut over 7 år siden

$10-30 USD

Betalt ved levering
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
Prosjekt-ID: 12256790

Om prosjektet

2 forslag
Eksternt prosjekt
Aktiv 7 år siden

Ønsker du å tjene penger?

Fordeler med budgivning på Freelancer

Angi budsjettet og tidsrammen
Få betalt for arbeidet ditt
Skisser forslaget ditt
Det er gratis å registrere seg og by på jobber
Tildelt til:
Brukeravatar
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 om 1 dag
5,0 (76 omtaler)
5,8
5,8

Om klienten

UNITED STATESs flagg
United States
0,0
0
Medlem siden des. 2, 2016

Klientbekreftelse

Andre jobber fra denne klienten

Write some Software
$10-30 USD
Takk! Vi har sendt deg en lenke for at du skal kunne kreve din gratis kreditt.
Noe gikk galt. Vær så snill, prøv på nytt.
Registrerte brukere Publiserte jobber
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Forhåndsvisning innlasting
Tillatelse gitt for geolokalisering.
Påloggingsøkten din er utløpt og du har blitt logget ut. Logg på igjen.