Find Jobs
Hire Freelancers

Write some Software DFA

$10-30 USD

已完成
已发布超过 7 年前

$10-30 USD

货到付款
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: 12256790

关于此项目

2提案
远程项目
活跃7 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
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 在1天之内
5.0 (76条评论)
5.8
5.8

关于客户

UNITED STATES的国旗
United States
0.0
0
会员自12月 2, 2016起

客户认证

这个客户的其他工作

Write some Software
$10-30 USD
谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。