I have created programming exercises. You have to create a github repository and upload your code there. I'll evaluate the functionality, your coding style, accordance to the coding standards and code coverage by unit tests.
Finish the string calculator code.
1. Create a simple String calculator with a method signature:
int Add(string numbers)
2. The method can take up to two numbers, separated by commas, and will return their sum.
for example “” or “1” or “1,2” as inputs. (for an empty string it will return 0)
Hints:
3. Allow the Add method to handle an unknown amount of numbers 4. Allow the Add method to handle new lines between numbers (instead of commas).
the following input is ok: “1\n2,3” (will equal 6) the following input is NOT ok: “1,\n” (not need to prove it - just clarifying)
5. Support different delimiters * to change a delimiter, the beginning of the string will contain a separate line that looks like this: “//[delimiter]\n[numbers…]” for example “//;\n1;2” should return three where the default delimiter is ‘;’ . * the first line is optional. all existing scenarios should still be supported * Calling Add with a negative number will throw an exception “negatives not allowed” - and the negative that was passed. * if there are multiple negatives, show all of them in the exception message.
STOP HERE if you are a beginner. Continue if you can finish the steps so far in less than 30 minutes.
6. Numbers bigger than 1000 should be ignored, so adding 2 + 1001 = 2 7. Delimiters can be of any length with the following format: “//[delimiter]\n” for example: “//[***]\n1***2***3” should return 6
————————————————————————————————
8. Allow multiple delimiters like this:
“[delim1][delim2]\n” for example “[*][%]\n1*2%3” should return 6.
9. make sure you can also handle multiple delimiters with length longer than one char
Create a Password verifications class called “PasswordVerifier”.
Add the following verifications to a master function called “Verify()”
Each one of these should throw an exception with a different message of your choosing
A measuring machine measures certain parameters of a workpiece and creates a pdf report file. That pdf file will be sent to customers. Customer want to be sure that the pdf file is valid in other words it was generated by the software at the specified time and no one manipulated the file. So that pdf file has to be digitally signed.
For the exercises use a coding standard like https://google.github.io/styleguide/javaguide.html or http://tinyurl.com/pmz4xc5 You have to create unit tests.
Write an essay. The essay must be unpublished, original work. I offer 4 topics - you need to select only one
Formal requirements at: https://icessd.uni-miskolc.hu/content/7/7_2.docx. The essay must be more than 5 pages long
Please decide whether you want to write an essay or implement the coding excercises. Put your choice to the shared document https://docs.google.com/spreadsheets/d/1xkIua-5uW5hOQ_B88uXlhsD6i9OL2KOa3nPV4WleU9k/edit?usp=sharing
Java Coding Standard by Oracle or download the local copy of the document
Daniel Galin: Software Quality Assurance From theory to implementation
Sample excercises can be downloaded.
Watch the video series called JUnit 5 Basics
Create your own JUnit tests and be confident how to use it. If you have any problem my code is available, see the sample code section
Watch the video Understanding Mock Objects
Create a sample code using Mock objects. You can use this link.
Watch this tutorial about git and guthub.
Create a github repository and your mock sample code.
More videos about git https://www.youtube.com/playlist?list=PLpL2ONl1hMLtlY1Y7YJNcA5zumvaITLYs
Please watch first 6 videos from https://www.youtube.com/watch?v=vhYK3pDUijk&list=PLGLfVvz_LVvSuz6NuHAzpM52qKM6bPlCV
Please watch second 6 videos from https://www.youtube.com/watch?v=vhYK3pDUijk&list=PLGLfVvz_LVvSuz6NuHAzpM52qKM6bPlCV
Please watch last 6 videos from https://www.youtube.com/watch?v=vhYK3pDUijk&list=PLGLfVvz_LVvSuz6NuHAzpM52qKM6bPlCV