[Solved] CECS 524 Assignment 3

Click And Check all our Assignments
Click Here and Upload you Assignment for Free!

INSTANT DOWNLOAD!

100/100 Trustscore on scamadviser.com

10 USD $

Category: Tag:

General Instruction

  1. ( Write regular expression to capture the hexadecimal floating-point values. A hexadecimal floating-point value has an optional fractional portion (beginning with a dot) and a mandatory exponent (beginning with P or p). There may be digits to the left of the dot, the right of the dot, or both, and the exponent itself is given in decimal (contains only the digits 0-9), with an optional leading + or – sign. A hexadecimal floating-point value may end with an optional F or f (indicating “float”-single precision) or L or l (indicating “long”-double precision).
    1. A character
    2. The empty string
  • Concatenation
  1. ‘or’
  2. Kleene star. (Please use superscript star symbols, ?)
  1. (21 points) Write a Java, C++, and Python programs (without external library) that determines whether a given stream of characters is a hexadecimal floating-point value or not.
    1. The file names of the source codes should be java, Assn3.cpp, Assn3.py.
    2. The programs should read the input file name from the command-line argumentspassed to the program. (args[], argv[], sys.argv[]).
  • The program should read each line from an input file and print out its evaluation.
  1. You can use any regular expression which is allowed in the programming languages.
  2. Execution commands should be:

javac Assn3.java; java Assn3 a3_input.txt g++ Assn3.cpp -o Assn3; ./Assn3 a3_input.txt python Assn3.py a3_input.txt

Expected output for the provided a3 input.txt.

Matched: 0x1p+1

Not Matched: 0x1p+8.8

Not Matched: 1a.0p-6 Matched: 0x1.b7p-1

Note. Your programs will be tested with a different test file.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CECS 524 Assignment 3
10 USD $