Starting from:

$25

EECS 293  Software Craftsmanship Programming Assignment 9   

Programming In this assignment, you will debug the numbers application (posted on blackboard). Here are the original specifications, which were then botched in the provided code: Write a method that accepts an integer number in English and prints it out in numerical notation. For example: Input Output one hundred thirty one 131 two thousand five 2005 nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety nine 999999999 minus four hundred fifty thousand two -450002 naught 0 Here are the rules for the input format. You will have to decide on and implement error handling if the input is invalid. All letters are lower case. Only integers between -999999999 and 999999999 are valid. The number 0 is represented by “naught” or “zero”. The other integers are represented as [minus|negative] [<prefix million] [<prefix thousand] [<prefix] ([…] means that the … is optional). In turn, <prefix is [<digit hundred] [ (<n-ty [<digit] | <teen | ten | <digit)] Page 2 of 2 where (x | y | z | ...) means exactly one of x, y, z, …; <n-ty is (twenty | thirty | forty | fifty | sixty | seventy | eighty | ninety) <teen is (eleven | twelve | thirteen | fourteen | fifteen | sixteen | seventeen | eighteen | nineteen) and <digit is (one | two | three | four | five | six | seven | eight | nine) If the provided code fails to implement this specification, you should consider it to be a defect to fix. Debug the code provided in blackboard so as to match the specification above. Submit a diff file to document all of the fixes that you made. Create test cases that capture the defects that you find. Create a new git repository called debug.git and submit your work to it. Discussion Guidelines The class discussion will focus on refactoring (changes to the source code) to fix bugs, and on the debug test cases.

More products