S o, let’s try to beat CloudCoder creating our version of a “Compiler”.
First tier (Grade from 0 to 15)
The software will accept in input a text file containing a Java Class. It will recognize the presence of Instance variables, Constructors and Methods. Plus, the package name and import packages.
If the file doesn’t contain syntax errors, it will print in output something like “the class is OK”.
If it contains errors, it will print the line numbers where the problems are.
Any statement ends with a semicolon.
A class can belong to one package only and must be the first thing specified in a file (remember that is not mandatory).
Only one import with the same name can be considered correct. So, if the file is trying to import the same package twice, this is an error.
A class can contain only one Constructor with the same signature, but any with different signatures; also no Constructor at all.
The same with Methods, only one with the same signature, any with different signatures, or no Methods at all.
The Instance variables can be int, float, boolean, char and String.
Something similar I found on Chegg: https://www.chegg.com/homework-help/questions-and-answers/create-following-software-program-using-regular-expressions-cr…
Among other benefits, we guarantee:
Essays written from scratch – 100% original,
Competitive prices and excellent quality,
24/7 customer support,
Priority on customer’s privacy,
Unlimited free revisions upon request, and
Plagiarism free work.